Actual object memory layout can be a little tricky when inheritance and its virtual tables are involved. And it gets even trickier when pointer arithmetic is employed. Do you consider yourself a low-level expert?
Archive for the ‘questions’ Category
A question of memory layout
Posted in questions on 20/01/2010 | 6 Comments »
Problematic declaration syntax
Posted in questions on 20/08/2009 | 2 Comments »
This question was written by a friend who luckily let me use it. It presents a very common pitfall of C++, regarding the syntax of decleration statements.
Destructors and placement new
Posted in questions on 16/08/2009 | 1 Comment »
When using placement new operator, destruction isn’t as transparent as usual..
Constructor selection with virtual inheritance
Posted in questions on 11/08/2009 | 3 Comments »
Virtual inheritance has quite a few common pitfalls, one of which is related to the construction of the virtual base.
Difference between “vector v” and “vector v()”
Posted in questions on 11/08/2009 | 1 Comment »
The given two statements actually translate to two very different declerations.