标准库头文件 <typeindex>_C++中文网
此头文件是类型支持库的一部分。
类
概要
namespace std { class type_index; template <class T> struct hash; template<> struct hash<type_index>; }
类 std::type_index
class type_index { public: type_index(const type_info& rhs) noexcept; bool operator==(const type_index& rhs) const noexcept; bool operator!=(const type_index& rhs) const noexcept; bool operator< (const type_index& rhs) const noexcept; bool operator<= (const type_index& rhs) const noexcept; bool operator> (const type_index& rhs) const noexcept; bool operator>= (const type_index& rhs) const noexcept; size_t hash_code() const; const char* name() const; private: const type_info* target; // 仅用于阐释 // 注意,此处使用了指针而非引用, // 表示预置的复制/移动构造函数及赋值运算符均有所提供并按预期工作。 };