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

std::hash

Defined in header <string_view>

template<> struct hash<std::string_view>; template<> struct hash<std::wstring_view>; template<> struct hash<std::u16string_view>; template<> struct hash<std::u32string_view>;

(since C++17)

模板的专门化std::hash用于哈希视图的各种视图类。

These hashes equal the hashes of corresponding std::basic_string classes: If S is one of the standard basic_string types, SV is the corresponding string view type, and s is an object of type S, then std::hash<S>()(s) == std::hash<SV>()(SV(s)).

(since C++17)

另见

hash (C++11)

hash function object (class template)

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

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

扫码关注腾讯云开发者

领取腾讯云代金券