exception( const exception& other ) throw();
exception( const exception& other ) noexcept;
Constructs new exception object.
otherboth have dynamic type
std::exceptionthen std::strcmp(what(), other.what()) == 0. (since C++11)
|other||-||another exception to assign the contents of|
std::exception is not permitted to throw exceptions, when derived classes (such as std::runtime_error) have to manage a user-defined diagnostic message, it is typically implemented as a copy-on-write string.
The Microsoft implementation includes non-standard constructors taking strings thus allowing instances to be thrown directly with a meaningful error message. The nearest standard equivalents are std::runtime_error or std::logic_error.