I get the Compiler Error C2071 when I try to implement the explicit operator bool:
explicit operator bool
class C { public: explicit operator bool() const {
Visual Studio 2012 does not support explicit conversion operators, see C++11 Features in Visual C++ 11.
These articles talk about the safe bool idiom: