]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Use char for _Utf8_view if char8_t isn't available [PR114519]
authorJonathan Wakely <jwakely@redhat.com>
Tue, 2 Apr 2024 21:46:55 +0000 (22:46 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 8 Apr 2024 16:44:18 +0000 (17:44 +0100)
commitfeb6a2d3569095706170c9400e93add27a66e034
tree0e8d911134b6e2bb3e78f4eecfcbc9336b9ab971
parentcd77e152875d3bc9c8966fc20241d73aa47532b3
libstdc++: Use char for _Utf8_view if char8_t isn't available [PR114519]

Instead of just omitting the definition of __unicode::_Utf8_view when
char8_t is disabled, we can make it use char instead.

libstdc++-v3/ChangeLog:

PR libstdc++/114519
* include/bits/unicode.h (_Utf8_view) [!__cpp_char8_t]: Define
using char instead of char8_t.
* testsuite/ext/unicode/view.cc: Use u8""sv literals to create
string views, instead of std::u8string_view.
libstdc++-v3/include/bits/unicode.h
libstdc++-v3/testsuite/ext/unicode/view.cc