std::exception::operator=

来自cppreference.com
< cpp‎ | error‎ | exception
 
 
 
 
 
exception& operator=( const exception& other ) throw();
(C++11 前)
exception& operator=( const exception& other ) noexcept;
(C++11 起)

复制赋值运算符。赋值 other 的内容

赋值后调用 what() 的效果是实现定义的。

(C++11 前)

*thisother 均拥有动态类型 std::exception ,则 std::strcmp(what(), other.what()) == 0

(C++11 起)

参数

other - 要赋值内容的另一 exception