Does MSVC10 Visual Studio 2010 support explicit C ++ conversion operators

Does Visual Studio 2010 MSVC10 support explicit conversion operators or the secure bool idiom that still needs to be implemented?

This code does not compile:

explicit operator bool() const { return Traits::invalid() != value; } 

Compiler error : error C2071: foo :: operator bool ': illegal storage class

+6
source share
1 answer

No, VS2010 has very limited support for C ++ 0x. Below is a list of features supported by VS2010 .

+7
source

Source: https://habr.com/ru/post/894444/


All Articles