First  |  Prev |  Next  |  Last
Pages: 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
Available C++ Libraries FAQ
Available C++ Libraries FAQ URL: http://www.trumphurst.com/cpplibs/ This is a searchable list of libraries and utilities (both free and commercial) available to C++ programmers. If you know of a library which is not in the list, why not fill in the form at http://www.trumphurst.com/cpplibs/cppsub.php Main... 2 Feb 2010 21:56
CRTP and typedef
I seem to have a problem with CRTP and typedefs, here is a sample code: template<class B> class Sequence { public: typedef typename B::ElementType ElementType; } template<class T> class Container { public: typedef T ElementType; } Containter<char> test; but the compiler says that ... 3 Feb 2010 18:31
operator= required for std::vector<>::push_back ??
If I have the following test file, x.cc: #include <vector> class X { public: X (const int &_i) : i (_i) { } X (const X &x) : i (x.i) { } #if 0 X &operator= (const X &x) { if (&x != this) new (this) X (x.i); return *this; } ... 2 Feb 2010 14:44
const as default
Hi I've wondered for some time if C++ would benefit if class member functions were const by default, the opposite of the current behaviour. So that if a member function could potentially update mutable state, it would have to explicity override the const default in the signature. In reading some of the argum... 2 Feb 2010 14:44
enums and strings
Why exactly is this allowed? enum Fred { jim, bill, eric } int main() { std::string x; x = jim; return 0; } eliding the constructor and the assignment elicits the expected error. It hardly seems a useful thing to do. It happens on 2 compilers -- [ See http://www.gotw.ca/resou... 2 Feb 2010 14:43
enum operator overload ambiguity
Hello, is this expected behavior or a bug in Visual C++ 9? enum E { e1 }; bool operator<=( E, E ) { return false; } void main() { E e1; e1<=e1; } leads to compiler error test6.cpp(10): could be 'bool operator <=(E,E)' or 'built-in C++ operator<=(E, E)' while trying to match the arg... 2 Feb 2010 14:43
Portability and floating point exceptions
I have some questions about how floating point errors should be handled portably in C++ programs. The errors I am talking about are associated with C math functions such as exp. Documentation such as http://docs.sun.com/app/docs/doc/806-3332/6jcg55o9k?a=view talks about 'exceptions' but the math library is a C li... 2 Feb 2010 21:56
Why are static member variables allowed in c++ and not in C?
Hi All, I have seen this question(mentioned in subject) posted in various forums but some how I am not statisfied with the answer. 1- Is this because of where static variables are placed in c and c++ 2- or There is a constraint from the language(C) (didn't understand this much) and also related to this any... 2 Feb 2010 14:43
C++ Network library?
Hello, can you suggest me a portable C++ network library? So far I've been told that there are ACE and boost::asio but I know nothing about them, have you ever used them? Impressions (in terms of easy-of-use, documentation, design)? Thanks, Mattia -- [ See http://www.gotw.ca/resources/clcm.htm for info... 2 Feb 2010 14:43
Using vs. typedef
Hi All, I see two ways to import types in a specific namespace : using declarations and typedefs. For example : namespace <whatever> { using std::string; } or namespace <whatever> { typedef std::string string; } So one can write : namespace <whatever> { void do_something( string &str )... 26 Jan 2010 17:46
First  |  Prev |  Next  |  Last
Pages: 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54