typeindex
此标头是类型支持图书馆。
班
type_index (C++11)  | wrapper around a type_info object, that can be used as index in associative and unordered associative containers (class)  | 
|---|---|
std::hash<std::type_index> (C++11)  | hash support for std::type_index (class template specialization)  | 
前向声明
在标头中定义<functional>
散列%28C++11%29散列函数对象%28类模板%29
简介
二次
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; // exposition only
    // Note that the use of a pointer here, rather than a reference,
    // means that the default copy/move constructor and assignment
    // operators will be provided and work as expected.
};二次
 © cppreference.com在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com

