Стандартная библиотека заголовок <typeinfo>
Этот заголовок является частью библиотеки поддержки типов.
Классы
| содержит информацию о типе, сгенерированную реализацией. Это класс, возвращаемый оператором 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;
};
}
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/header/typeinfo