The code below compiles in VS 2012 but not in VS 2013
std::ofstream stm; if(stm != NULL) { }
In VS 2013 you get this compilation error:
The operator is defined in section 27.5.5 Class template basic_ios.
27.5.5 Class template basic_ios
27.5.5.1 Overview explicit operator bool() const;
27.5.5.1 Overview
explicit operator bool() const;
And then
27.5.5.4 basic_ios flags functions explicit operator bool() const; Returns: !fail().
27.5.5.4 basic_ios flags functions
Returns: !fail().