How to deal with noexcept in Visual Studio

前端 未结 11 1808
一整个雨季
一整个雨季 2021-01-31 07:42

I\'m trying to create a custom exception that derives from std::exception and overrides what(). At first, I wrote it like this:

class U         


        
11条回答
  •  無奈伤痛
    2021-01-31 08:31

    It seems that the old throw() (deprecated in C++11) works in both compilers. So I changed the code to:

    virtual const char* what() const throw() override
    

提交回复
热议问题