Brainfart: GCC and templates (10)

6 Name: #!/usr/bin/anonymous : 2006-10-29 08:55 ID:cMRxjRN8

>>3
Plus, structs have different alignment rules. I seem to recall that classes' members may be even reordered to get better packing in the presence of alignment constraints, whereas structs need to appear in memory as they are declared.

Where the vtable pointer appears in the struct, I have no idea. It would sound like a rather bad idea to rely on the in-memory format of a structure that has virtual methods.

This thread has been closed. You cannot post in this thread any longer.