I've discovered while trying to use a luaBind-style class binding system that passing pointers to member variables doesn't seem to work right when compiling as a 64 bit app. Specifically:
class Foo {
int a;
int b;
};
With the above class getting &Foo::b in 32 bit will return (as expected) 0x00000004. The same call in 64 bit returns 0xCCCCCCCC00000004, which is 32 bits of correct and 32 bits of WTF.
My first thought is that this is a bug in the compiler (I'm using Visual Studio 2005 SP1 on Vista 64 Business), but that seems like a pretty big bug for a IDE that proudly claims 64 bit compatibility. Googling turns up nothing (but I may be using the wrong term. Member Variable Pointer? Anyone care to correct me?), so I'm curious if this is just me or a more widespread issue.