任何人都可以解释C++中使用的异常规范吗?
这个错误是什么意思?我该如何解决?这是导致它的标头代码:
class BadJumbleException : public exception {
public:
BadJumbleException (const string& msg); // Constructor, accepts a string as the message
string& what(); // Returns the message string
private:
string message; // Stores the exception message
};
Run Code Online (Sandbox Code Playgroud)
这是源代码:
BadJumbleException::BadJumbleException (const string& m) : message(m) {}
string& BadJumbleException::what() { return message; }
Run Code Online (Sandbox Code Playgroud)
编辑:这是错误:
'virtual BadJumbleException :: ~BadJumbleException()的松散抛出说明符