aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-parser.c
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2021-10-08 14:24:18 +0100
committerJonathan Wakely <jwakely@redhat.com>2021-10-09 00:57:49 +0100
commit0afb9ebaab09b999f1d158ffc3fb906fdab9df67 (patch)
tree4b8a8f44384d99733d8ea59f151f6bb9a44cc618 /gcc/c/c-parser.c
parentcfeff094e6410844d2324193610cb7a512d67713 (diff)
downloadgcc-0afb9ebaab09b999f1d158ffc3fb906fdab9df67.zip
gcc-0afb9ebaab09b999f1d158ffc3fb906fdab9df67.tar.gz
gcc-0afb9ebaab09b999f1d158ffc3fb906fdab9df67.tar.bz2
libstdc++: Always define typedefs and hash functions for wide strings [PR 98725]
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.
Diffstat (limited to 'gcc/c/c-parser.c')
0 files changed, 0 insertions, 0 deletions