I am trying to implement Foo and Bar as singleton classes ( hence the static pointer to the same class and private constructor ). You cannot initialize a member of a class in the class definition unless it is a const. This is the way to do it, I have done it before.
Funny. Never used singletons in C++ before, so I sort of missed out on that one. Yeah, anyways. Frankly, I am stumped aswell. Maybe some of your other code is messing with you, this works just fine for me:
Yup,
I was some other part of the code. Sorry about that. I am going to report this thread. I was working on a more complicated class structure and the error was buried deep within :)