首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

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

简介

二次

代码语言:javascript
复制
namespace std {
    class type_index;
    template <class T> struct hash;
    template<> struct hash<type_index>;
}

二次

std::type_index

二次

代码语言:javascript
复制
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.
};

二次

代码语言:txt
复制
 ? cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com