[libavg-devel] Dynamic Node Creation Enhancements

Ulrich von Zadow uzadow at libavg.de
Thu Feb 14 10:33:48 CET 2008


Nick Hebner wrote:
> On Wed, Feb 13, 2008 at 1:27 PM, Ulrich von Zadow <uzadow at libavg.de> wrote:
> 
>> Hi,
>>
>> I need a bit of time to look this over, because I still think it should
>> work. Member variables of base classes never move in derived classes
>> (even with multiple inheritance), as long as you always use a pointer to
>> the base class. For simple single inheritance, the pointer to an object
>> shouldn't change either in a cast from base to derived class and back.
>> offsetof(), while technicaly undefined, _should_ work for these objects
>> in all sane implementations of C++ (For discussions of this, see
>> http://gcc.gnu.org/ml/gcc/2003-11/msg00279.html and
>> http://carcino.gen.nz/tech/cpp/multiple_inheritance_this.php).
> 
> Hmm, ok you clearly know much more about it than I do, so I'll leave it to
> you.

Not that much more - I just used google ;-). The second link explains 
object layout in memory very well.

>> It might take a moment for me to get around to it, though, so getting
>> the first patch into svn would be great.
> 
> Great. Would you like me to submit another patch to the list, or just commit
> it?

Just commit it :-).

Cheers,

   Uli

-- 

Ulrich von Zadow | +49-172-7872715
Jabber: cocacoder at jabber.berlin.ccc.de
Skype: uzadow



More information about the libavg-devel mailing list