-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Closed as not planned
Closed as not planned
Copy link
Labels
libc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.wontfixIssue is real, but we can't or won't fix it. Not invalidIssue is real, but we can't or won't fix it. Not invalid
Description
Currently, _LIBCPP_HAS_NO_CHAR8_T
is always defined if not compiled with -std=c++20
or above:
llvm-project/libcxx/include/__config
Lines 702 to 704 in 3ab2247
# if _LIBCPP_STD_VER <= 17 || !defined(__cpp_char8_t) | |
# define _LIBCPP_HAS_NO_CHAR8_T | |
# endif |
But both Clang and GCC allow char8_t
in older standards with the -fchar8_t
flag: https://godbolt.org/z/ePcrqvWsa
Someone specifying -fchar8_t
presumably is going to use char8_t
consistently even before C++20, so it makes sense to allow using library facilities for char8_t
. One problem I can think of is that some names (like u8string
) aren't reserved in C++17, but someone using -fchar8_t
should know not to use them. Plus libstdc++ supports it.
Metadata
Metadata
Assignees
Labels
libc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.wontfixIssue is real, but we can't or won't fix it. Not invalidIssue is real, but we can't or won't fix it. Not invalid