First  |  Prev |  Next  |  Last
Pages: 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
How to declare the type in the class?
Hi, my problem below: //1.h class A { public: enum B{a,b,c}; }; //2.h how to declare enum B? class C { public: void func(A::B m); }; Thank you very much! -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time pos... 16 Apr 2008 13:13
Meyers effective C++, templates, np-complete
Scott Meyers in Effective C++ at the start of the templates section says that C++ templates are np-complete in the compiler processing. Does this mean that the use of templates can cause the compile to execute for an infinite loop or near infinite loop? Todd. -- [ See http://www.gotw.ca/resources/clcm.ht... 16 Apr 2008 13:13
ANN: C++ cycliclogs library/commands is promoted to stable status
I have just changed the status of my cycliclogs package on sourceForge, http://sourceforge.net/project/showfiles.php?group_id=97900 so that it is now marked as production/stable. It had been marked as alpha for quite some time. I ran it through the latest GCC compiler just to be sure it still builds ok and did a bi... 14 Apr 2008 13:47
Partially complete types
In C++ you are allowed to declare an incomplete type (a "forward"). Code can operate on references and pointers to such types. This is a very nice feature with regard to encapsulation. I often use this feature to omit detail in interfaces; detail that not all clients need to know. For example: class Compone... 16 Apr 2008 05:01
Simulating new user-defined operators
In C++ you cannot declare new user-defined operators, i.e. it is impossible to define a new operator token with a specified precedent and meaning, e.g. the euro symbol (EURO) to convert a value into euro cents. It is possible to simulate this to some degree using an object of a user-defined class with an operato... 16 Apr 2008 05:48
question to understand templates
Dear all, I'm trying learn templates concept. Here is a line of code from Bjarne Strustrup's C++ programming language 3rd edition: template<class C> struct String<C>::Srep I couldn't understand what the above line of code means. I'm expecting "struct/class <name>" after template<class C>. What exactly Stri... 14 Apr 2008 14:36
Does taking address of function template specialization not force instantiation?
Daniel Kr�gler wrote: This should not compile, because you are attempting to apply a pointer to non-const member function to references to const. Fix this to read: template <typename Element, typename Member, Member (Element::*memPtr)() const> bool lessMe... 14 Apr 2008 12:10
Writing a std::allocator for a map<>
I am trying to write an allocator compatible with std::map. I am using stlport 5.1 and VS 2003. I get an obscure compile error message: stlpd_std::priv::_STLP_alloc_proxy<_Value,_Tp,_MaybeReboundAlloc>::_STLP_alloc_proxy(const _MaybeReboundAlloc &,_Value)' : cannot convert parameter 1 from 'const stlpd_std::p... 13 Apr 2008 14:19
String literal as template parameter?
Hi all, I was thinking about language feature allowing convert string literal into variadic character pack (char...). Here is real life use case, which comes from Yard parser library (http://yard-parser.sourceforge.net/cgi-bin/index.cgi). It shall define parser that matches sequence of characters. Exact imple... 19 Apr 2008 03:24
Does taking address of function template specialization not force instantiation?
On 11 Apr., 19:50, Gerhard Menzl <clcppm-pos...(a)this.is.invalid> wrote: Consider: #include <algorithm> #include <vector> template <typename Element, typename Member, Member (Element::*memPtr)()> bool lessMember(Element const& left, Element co... 14 Apr 2008 22:36
First  |  Prev |  Next  |  Last
Pages: 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59