explicit operator bool error

后端 未结 2 2264
甜味超标
甜味超标 2021-01-11 15:15

I get the Compiler Error C2071 when I try to implement the explicit operator bool:

class C
{
public:

    explicit operator bool() const
    {
          


        
2条回答
  •  春和景丽
    2021-01-11 15:33

    If you look at a list of features in Visual Studio 2010 you can see that it was not an available feature. A look at What's New for Visual C++ in Visual Studio 2012 shows that is has not been added.

提交回复
热议问题