[basic.string.hash]

# 27 Strings library [[strings]](./#strings)

## 27.4 String classes [[string.classes]](string.classes#basic.string.hash)

### 27.4.6 Hash support [basic.string.hash]

[ð](#lib:hash,basic_string)

`template<class A> struct hash<basic_string<char, char_traits<char>, A>>;
template<class A> struct hash<basic_string<char8_t, char_traits<char8_t>, A>>;
template<class A> struct hash<basic_string<char16_t, char_traits<char16_t>, A>>;
template<class A> struct hash<basic_string<char32_t, char_traits<char32_t>, A>>;
template<class A> struct hash<basic_string<wchar_t, char_traits<wchar_t>, A>>;
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/strings.tex#L5392)

If S is one of these string types,SV is the corresponding string view type, ands is an object of type S,
then hash<S>()(s) == hash<SV>()(SV(s))[.](#1.sentence-1)
