std::bad_typeid
提供: cppreference.com
ヘッダ <typeinfo> で定義
|
||
class bad_typeid : public std::exception; |
||
多相型のヌルポインタ値の逆参照に typeid 演算子が適用されたとき、この型の例外が投げられます。
目次 |
[編集] メンバ関数
新しい bad_typeid オブジェクトを構築します (パブリックメンバ関数) |
std::exception から継承
メンバ関数
[仮想] |
例外オブジェクトを破棄します ( std::exception の仮想パブリックメンバ関数)
|
[仮想] |
説明文字列を返します ( std::exception の仮想パブリックメンバ関数)
|
[編集] 例
Run this code
出力:
Attempted a typeid of NULL pointer!