標準ライブラリヘッダ <typeinfo>
提供: cppreference.com
このヘッダは型サポートライブラリの一部です。
目次 |
[編集] クラス
| 処理系によって生成される、何らかの型の情報を持ちます。 これは typeid 演算子によって返されるクラスです (クラス) | |
| typeid 式の引数がNULLの場合に投げられる例外 (クラス) | |
| 無効な dynamic_cast 式、例えば参照型のキャストの失敗によって投げられる例外 (クラス) |
[編集] 概要
namespace std { class type_info; class bad_cast; class bad_typeid; }
[編集] クラス std::type_info
class type_info { public: virtual ~type_info(); bool operator==(const type_info& rhs) const noexcept; bool operator!=(const type_info& rhs) const noexcept; bool before(const type_info& rhs) const noexcept; size_t hash_code() const noexcept; const char* name() const noexcept; type_info(const type_info& rhs) = delete; // cannot be copied type_info& operator=(const type_info& rhs) = delete; // cannot be copied };
[編集] クラス std::bad_cast
class bad_cast : public exception { public: bad_cast() noexcept; bad_cast(const bad_cast&) noexcept; bad_cast& operator=(const bad_cast&) noexcept; const char* what() const noexcept override; };
[編集] クラス std::bad_typeid
class bad_typeid : public exception { public: bad_typeid() noexcept; bad_typeid(const bad_typeid&) noexcept; bad_typeid& operator=(const bad_typeid&) noexcept; const char* what() const noexcept override; };

