知道为什么 virtual ~exception() throw() 在 C++98 中,但 virtual ~exception() 在 C++11 中吗?
允许 C++11 加入类的析构函数的设计决策是什么exception
?
从这里:
c++98:
class exception {
public:
exception () throw();
exception (const exception&) throw();
exception& operator= (const exception&) throw();
virtual ~exception() throw();
virtual const char* what() const throw();
}
c++11:
class exception {
public:
exception () noexcept;
exception (const exception&) noexcept;
exception& operator= (const exception&) noexcept;
virtual ~exception();
virtual const char* what() const noexcept;
}