Namespaces
Variants

Standard library header <typeinfo>

From cppreference.net
Standard library headers

이 헤더는 type support 라이브러리의 일부입니다.

목차

클래스

일부 타입의 정보를 포함하며, typeid 연산자가 반환하는 클래스
(클래스)
typeid 표현식 에서 인자가 null인 경우 발생하는 예외
(클래스)
유효하지 않은 dynamic_cast 표현식에 의해 발생하는 예외, 즉 참조 타입 캐스트가 실패한 경우
(클래스)

시놉시스

// all freestanding
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;
    type_info& operator=(const type_info&) = delete;
  };
}

클래스 std::bad_cast

namespace std {
  class bad_cast : public exception
  {
  public:
    // 특수 멤버 함수들의 명세에 대한 설명 참조
    constexpr const char* what() const noexcept override;
  };
}

클래스 std::bad_typeid

namespace std {
  class bad_typeid : public exception
  {
  public:
    // 특수 멤버 함수들의 명세에 대한 설명 참조
    constexpr const char* what() const noexcept override;
  };
}