名前空間
変種
操作

標準ライブラリヘッダー <typeinfo>

From cppreference.com
 
 
標準ライブラリヘッダー
 

このヘッダは型サポートライブラリの一部です。

目次

[編集] クラス

ある型の情報を保持し、typeid演算子によって返されるクラス
(クラス) [編集]
typeid 式の引数が null の場合にスローされる例外
(クラス) [編集]
無効な dynamic_cast 式、つまり参照型のキャストが失敗した場合にスローされる例外
(クラス) [編集]

[編集] 概要

namespace std {
  class type_info;
  class bad_cast;
  class bad_typeid;
}

[編集] クラス std::type_info

namespace std {
  class type_info {
  public:
    virtual ~type_info();
    constexpr 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&) = delete;                   // cannot be copied
    type_info& operator=(const type_info&) = delete;        // cannot be copied
  };
}

[編集] クラス std::bad_cast

namespace std {
  class bad_cast : public exception {
  public:
    // see [exception] for the specification of the special member functions
    const char* what() const noexcept override;
  };
}

[編集] クラス std::bad_typeid

namespace std {
  class bad_typeid : public exception {
  public:
    // see [exception] for the specification of the special member functions
    const char* what() const noexcept override;
  };
}
English 日本語 中文(简体) 中文(繁體)