]> git.ipfire.org Git - thirdparty/gcc.git/commit
Define std::hash specializations for C++17 PMR strings
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 3 Apr 2019 09:47:47 +0000 (09:47 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 3 Apr 2019 09:47:47 +0000 (09:47 +0000)
commit62fd39e8528514ca29425aef3e30c03cda859afa
treec4d7fd4a00fd3526c53a1055a9e91973a4a0fd1e
parent4e4018533b889d3c2de6231486b4e89371b853c0
Define std::hash specializations for C++17 PMR strings

These hash specializations should have been added when the pmr::string
and related typedefs were added.

* include/std/string (__hash_string_base): New class template defining
operator() for hashing strings.
(hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
(hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
* testsuite/21_strings/basic_string/hash/hash.cc: New test.
* testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270116 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/string
libstdc++-v3/testsuite/21_strings/basic_string/hash/hash.cc [new file with mode: 0644]
libstdc++-v3/testsuite/21_strings/basic_string/hash/hash_char8_t.cc [new file with mode: 0644]