Namespaces
Variants

std::bad_exception::bad_exception

来自 zh.cppreference.net
 
 
 
 
 
bad_exception() throw();
(1) (直至 C++11)
bad_exception() noexcept;
(自 C++11)
(自 C++26 起为 constexpr)
bad_exception( const bad_exception& other ) throw();
(2) (直至 C++11)
bad_exception( const bad_exception& other ) noexcept;
(自 C++11)
(自 C++26 起为 constexpr)

构造新的 bad_exception 对象。

1) 默认构造函数。what() 返回实现定义的字符串。
2) 拷贝构造函数。用 other 的内容初始化对象。如果 *this 和 other 都具有动态类型 std::bad_exception,则 std::strcmp(what(), other.what()) == 0(自 C++11)。

参数

其他 - 用于初始化的 bad_exception 对象