aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2023-08-15 16:35:22 +0100
committerJonathan Wakely <jwakely@redhat.com>2023-08-17 20:24:17 +0100
commit023a62b77f999b002d4c56a94475684a4d209788 (patch)
tree02a32da4849f02b3d37d2bc170c882b32fc205a8 /gcc
parentaeed687f4e08f1364ab60882a012fe740e05a7da (diff)
downloadgcc-023a62b77f999b002d4c56a94475684a4d209788.zip
gcc-023a62b77f999b002d4c56a94475684a4d209788.tar.gz
gcc-023a62b77f999b002d4c56a94475684a4d209788.tar.bz2
libstdc++: Rework std::format support for wchar_t
This changes how std::format creates wide strings, by replacing uses of std::ctype<wchar_t>::widen with the recently-added __to_wstring_numeric helper function. This removes the dependency on the locale, which should only be used for locale-specific formats such as {:Ld}. Also disable all the wide string formatting support if the _GLIBCXX_USE_WCHAR_T macro is not defined. This is consistent with other wchar_t support being disabled if the library is built without that macro defined. libstdc++-v3/ChangeLog: * include/std/format [_GLIBCXX_USE_WCHAR_T]: Guard all wide string formatters with this macro. (__formatter_int::_M_format_int, __formatter_fp::format) (formatter<const void*, C>::format): Use __to_wstring_numeric instead of std::ctype::widen. (__formatter_fp::_M_localize): Use hardcoded wchar_t values instead of std::ctype::widen. * testsuite/std/format/functions/format.cc: Add more checks for wstring formatting of arithmetic types.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions