First  |  Prev |  Next  |  Last
Pages: 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
Templates: default template argument in a friend class template declaration
Alberto Ganesh Barbati wrote: Oncaphillis ha scritto: I guess "shall not" can always be replaced by "shall not but can" in the standard. Please, do not spread incorrect interpretations of the standard. In ISO terminology the verb "to shall" always expresses a requirement. In particular the ... 1 Apr 2008 10:07
Thread cancellation in c++0x
Hi, I have seen, that the thread cancellation functionality has been removed from threads library paper. Does it mean we are not going to have the ability to cancel a thread in C++0x or is there going to be an alternative mechanism for it? Regards, &rzej -- [ See http://www.gotw.ca/resources/clcm.htm... 16 Apr 2008 17:14
An insert_iterator for forward_list
Since forward_list has been accepted into the standard, it might be a good idea to create a version of insert_iterator that works with it. Forward_list is basically a C-style singly-linked list, and for technical reasons it is defined so that insertions, deletions, etc. are performed after an input iterator, instea... 1 Apr 2008 16:14
Swappable concepts and ADL (was Re: Return versus Side-Effect)
Niels Dekker - no return address ha scritto: Alberto Ganesh Barbati wrote: On this topic, the very recent paper n2590 (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2590.pdf) proposes to introduce a new concept MemberSwappable, that would help avoid the need for the three overloads. ... 4 Apr 2008 08:59
Good books about STL and template
> Could you recommend some good books about STL and template? For STL: Effective STL The C++ Standard Library For templates: C++ Templates I have read those books and have really appreciated them. If you are interested, I have posted my reviews of these books on my blog: http://blog.olivierlanglois.ne... 1 Apr 2008 06:35
static asserts for value templates
Hello all, I have the following piece of code: template<int i, int j, int k> void foo() { // rule: i >= j // static_assert(i >= j) // static_assert((i - j) >= 2 * k) } int main() { foo<1,2,3>(); return 0; } I was wondering how one would go about creating an assert that runs at compile tim... 31 Mar 2008 20:39
I got a strange error message when using fstream!
#include <fstream> #include <iostream> #include <vector> using namespace std; class MyObj { public: int data; ifstream in; }; typedef std::vector<MyObj> MyObjVector; int main(int arc, char* argv[]) { MyObjVector myVector; MyObj obj; obj.data = 10; obj.in.open("test.txt"); ... 1 Apr 2008 07:54
Definition of lvalue/rvalue
Hi, as a second job I am teaching C++. I have only 3-4 months to teach it to students who had two semesters of exposure to Java. What I have learned doing this is that I need to find concise definitions for everything I want them to remember. Sometimes such definitions are surprisingly hard to find. One of the... 3 Apr 2008 20:52
Templates: default template argument in a friend class template declaration
Oncaphillis ha scritto: I guess "shall not" can always be replaced by "shall not but can" in the standard. Please, do not spread incorrect interpretations of the standard. In ISO terminology the verb "to shall" always expresses a requirement. In particular the expression "shall not" can be used to conve... 31 Mar 2008 20:00
Templates: default template argument in a friend class template declaration
Bharath wrote: #include<iostream> template<class , int> class Vector; template<class T, int i=100> class Vector { }; class vector_fr { template <class S, int i=56> friend class Vector; }; ....at least in g++ fails with: 'redefinition of default argument for �int i�' ... 31 Mar 2008 20:00
First  |  Prev |  Next  |  Last
Pages: 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57