Posted by: rmn on: 16/08/2009
When using placement new operator, destruction isn’t as transparent as usual..
Posted by: rmn on: 14/08/2009
Most compilers implement dynamic binding by using a vtable whose pointer resides at the beginning of each object’s memory footprint (something along the lines of [vtable-pointer|..members..], if we are not considering virtual inheritance). Keeping this idea in mind, why don’t we go ahead and attempt to change that vtable pointer?
Posted by: rmn on: 14/08/2009
From time to time we are required to print out a vector. It is possible to utilize the standard copy algorithm (std::copy) to do just that.
Posted by: rmn on: 13/08/2009
The C++ template mechanism is a very powerful tool. Besides its great ability of code generation, it can also be used to make useful computations at compile time. Let us introduce such an example.
Posted by: rmn on: 12/08/2009
What would you expect to happen in the following code?
Posted by: rmn on: 11/08/2009
Virtual inheritance has quite a few common pitfalls, one of which is related to the construction of the virtual base.
Posted by: rmn on: 11/08/2009
The given two statements actually translate to two very different declerations.
Recent comments