So the table is something like this
{"X",offsetof(Particle,X),TYPE_FLOAT},
The trouble is that the Particle class has a constructor. This makes it a none POD type and the offsetof macro really shouldn't be used.
Have other people come across this? I am wondering if it is one of those cases where the C++ spec is needlessly pedantic and the compiler handles it without a hiccup, or if it is a bit of code that's causing an obscure bug that is really hard to pin down.
I could see the result of the macro returns an offset that is incorrect, it depends on where the compiler puts the address of the constructor. If it puts it at the start of the memory block, then the offset may be pointing at the jump table instead of member variables, I guess this isn't happening as I would expect it to crash.
Or it could be allowing for the jump table, and giving correct values. Or the jump table could be after the member variables.
Maybe I'm paranoid and I should just ignore it, but just because I'm paranoid doesn't mean no one's out to get me













