First  |  Prev |  Next  |  Last
Pages: 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
overloading class specific operator new/delete with arguments
I want to overload operator new on my class to take an additional argument. I am therefore required to overload operator delete as well so that if the constructor throws it will call the matching operator delete. I do not want to write additional class specific operator new/delete that take no additional argume... 10 Feb 2010 21:20
Conversion of long type to int type
This code produces a warning regarding "conversion of long type to int type". .... void funk(int); .... long whatever; .... funk(whatever); // warning here .... Of course, I know that I should avoid these situations when I can, like making funk()'s argument a long. But sometimes funk() is not your funct... 13 Feb 2010 19:24
Why you should never use a const& parameter to initialize a const& member variable!
Martin B. wrote: For me the bottom line so far is that due to the semantics of references I will try to use them only for temporary/current-callstack stuff and never when I need to keep referencing the thing the reference points to. I'll try to give an example: void fA(T* p) { // or const* // 1)... 8 Feb 2010 23:39
C++ and shared objects
Hallo everybody I want to build some shared libraries from C++ code defining classes because I want to load them dynamically in programs that need that classes. I've read about dlopen and co., which require the implementation of factory procedures in order to dynamically allocate class instances from the loaded ... 8 Feb 2010 16:47
Compile time hooks, like: AClass<SomeType,Hooks<FunctorOne,FunctorTwo,...> >
On 4 f�v, 21:34, muggar <gall.c...(a)gmail.com> wrote: Hi, how to implement compile time hook mechanism? An use case would look like: AClass<SomeType,Hooks<FunctorOne,FunctorTwo,...>> aobj; AClass::AFunction() { // ... RunHooks(); // ... } So basically your "hooks" is... 8 Feb 2010 04:30
vector:erase iterator requirements
In the two forms of vector::erase: iterator erase(iterator position); iterator erase(iterator first, iterator last); can the 'iterator' mentioned be a vector::const_iterator, vector::reverse_iterator, or vector::const_reverse_iterator as well as a vector::iterator ? -- [ See http://www.gotw.ca/resou... 10 Feb 2010 21:20
Most vexing parse (was: Why you should never use a const& parameter to initialize a const& member variable!)
Olivier <olivier.grant(a)gmail.com> writes: On Feb 5, 8:47 pm, Paul Bibbings <paul.bibbi...(a)gmail.com> wrote: Olivier <olivier.gr...(a)gmail.com> writes: Daniel, your solution is definitely very elegant, and I looking forward to C++0x for this. But there is still something I don't seem to get wit... 6 Feb 2010 17:24
Call for Paper The International Journal of Computer Science (IJCS)
Call for Paper The International Journal of Computer Science (IJCS) publishes original papers on all subjects relevant to computer science, communication network, and information systems. The highest priority will be given to those contributions concerned with a discussion of the background of a practical problem,... 6 Feb 2010 07:28
Why you should never use a const& parameter to initialize a const& member variable!
Goran wrote: On Feb 4, 10:34 pm, "Martin B." <0xCDCDC...(a)gmx.at> wrote: And I'm personally completely OK with pointer parameters that must not be NULL. OK, but why? If it must not be NULL, then pointer means more typing and more possibility to pass NULL where you should not. But more importa... 5 Feb 2010 15:03
Layout of a most derive object of a type
Does the standard specify whether two most derived objects of the same type have the same layout? Considering the following note from the standard 10.0.5: Note: A base class subobject might have a layout (3.7) different from the layout of a most derived object of the same type. It does suggest so. Otherwise t... 14 Feb 2010 19:37
First  |  Prev |  Next  |  Last
Pages: 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52