diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2024-07-10 17:47:56 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2024-07-10 22:05:22 +0100 |
commit | 9f758953eb2cb89e306025dc232ae20da6cb860a (patch) | |
tree | 36e1da0c009fd21b23ef798b7712408bb1fc1c8e /libstdc++-v3/testsuite | |
parent | c5efc6eca8e3eee7038ae218cf7e2dbe9ed9d82a (diff) | |
download | gcc-9f758953eb2cb89e306025dc232ae20da6cb860a.zip gcc-9f758953eb2cb89e306025dc232ae20da6cb860a.tar.gz gcc-9f758953eb2cb89e306025dc232ae20da6cb860a.tar.bz2 |
libstdc++: Minor optimization for std::locale::encoding()
For the C locale we know the encoding is ASCII, so we can avoid using
newlocale and nl_langinfo_l. Similarly, for an unnamed locale, we aren't
going to get a useful answer, so we can just use a default-constrcuted
std::text_encoding representing an unknown encoding.
libstdc++-v3/ChangeLog:
* src/c++26/text_encoding.cc (__locale_encoding): Add to unnamed
namespace.
(std::locale::encoding): Optimize for "C" and "*" names.
Diffstat (limited to 'libstdc++-v3/testsuite')
0 files changed, 0 insertions, 0 deletions