Namespaces
Variants
Actions

Standard library header <typeinfo>

From cppreference.com
< cpp‎ | header
 
C++
 
Standard library headers
 

This header is part of the type support library.

Contents

[edit] Classes

contains some type’s information, the class returned by the typeid operator
(class) [edit]
exception that is thrown if an argument in a typeid expression is null
(class) [edit]
exception that is thrown by an invalid dynamic_cast expression, i.e. a cast of reference type fails
(class) [edit]

[edit] Synopsis

/ all freestanding
namespace std {
  class type_info;
  class bad_cast;
  class bad_typeid;
}

[edit] Class 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;
  };
}

[edit] Class std::bad_cast

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

[edit] Class std::bad_typeid

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

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant