0afb9ebaab
The wstring and wstring_view typedefs should be enabled even if <wchar.h> isn't supported, because char_traits<wchar_t> works unconditionally. Similarly, the std::hash specializations for wide strings do not depend on <wchar.h> support. Although the primary template works OK for std::char_traits<wchar_t> in the absence of <wchar.h> support, this patch still defines it as an explicit specialization for compatibility with declarations that expect it to be specialized. The explicit specialization just uses the same __gnu_cxx::char_traits base class as the primary template. libstdc++-v3/ChangeLog: PR libstdc++/98725 * include/bits/char_traits.h (char_traits<wchar_t>): Define explicit specialization unconditionally. * include/bits/basic_string.h (hash<wstring>): Define unconditionally. Do not check _GLIBCXX_USE_WCHAR_T. * include/bits/stringfwd.h (wstring): Likewise. * include/debug/string (wstring): Likewise. * include/experimental/string_view (experimental::wstring_view) (hash<experimental::wstring_view>): Likewise. * include/std/string (pmr::wstring, hash<pmr::wstring>): Likewise. * include/std/string_view (wstring_view, hash<wstring_view>): Likewise. |
||
---|---|---|
.. | ||
array | ||
assertions.h | ||
bitset | ||
debug.h | ||
deque | ||
formatter.h | ||
forward_list | ||
functions.h | ||
helper_functions.h | ||
list | ||
macros.h | ||
map | ||
map.h | ||
multimap.h | ||
multiset.h | ||
safe_base.h | ||
safe_container.h | ||
safe_iterator.h | ||
safe_iterator.tcc | ||
safe_local_iterator.h | ||
safe_local_iterator.tcc | ||
safe_sequence.h | ||
safe_sequence.tcc | ||
safe_unordered_base.h | ||
safe_unordered_container.h | ||
safe_unordered_container.tcc | ||
set | ||
set.h | ||
stl_iterator.h | ||
string | ||
unordered_map | ||
unordered_set | ||
vector |