[PATCH] Define std::hash specializations for C++17 PMR strings
Jonathan Wakely
jwakely@redhat.com
Wed Apr 3 09:47:00 GMT 2019
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.
Tested powerpc64le-linux, committed to trunk.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 6388 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20190403/9cd44354/attachment.bin>
More information about the Libstdc++
mailing list