diff options
Diffstat (limited to 'libcxx/include/cuchar')
| -rw-r--r-- | libcxx/include/cuchar | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libcxx/include/cuchar b/libcxx/include/cuchar index a4ed585d1aeb..93e657e84b6d 100644 --- a/libcxx/include/cuchar +++ b/libcxx/include/cuchar @@ -25,6 +25,8 @@ Types: mbstate_t size_t +size_t mbrtoc8(char8_t* pc8, const char* s, size_t n, mbstate_t* ps); // since C++20 +size_t c8rtomb(char* s, char8_t c8, mbstate_t* ps); // since C++20 size_t mbrtoc16(char16_t* pc16, const char* s, size_t n, mbstate_t* ps); size_t c16rtomb(char* s, char16_t c16, mbstate_t* ps); size_t mbrtoc32(char32_t* pc32, const char* s, size_t n, mbstate_t* ps); @@ -36,8 +38,17 @@ size_t c32rtomb(char* s, char32_t c32, mbstate_t* ps); #include <__assert> // all public C++ headers provide the assertion handler #include <__config> + #include <uchar.h> +#ifndef _LIBCPP_UCHAR_H +# error <cuchar> tried including <uchar.h> but didn't find libc++'s <uchar.h> header. \ + This usually means that your header search paths are not configured properly. \ + The header search paths should contain the C++ Standard Library headers before \ + any C Standard Library, and you are probably using compiler flags that make that \ + not be the case. +#endif + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif @@ -49,6 +60,10 @@ _LIBCPP_BEGIN_NAMESPACE_STD using ::mbstate_t _LIBCPP_USING_IF_EXISTS; using ::size_t _LIBCPP_USING_IF_EXISTS; +# if !defined(_LIBCPP_HAS_NO_C8RTOMB_MBRTOC8) +using ::mbrtoc8 _LIBCPP_USING_IF_EXISTS; +using ::c8rtomb _LIBCPP_USING_IF_EXISTS; +# endif using ::mbrtoc16 _LIBCPP_USING_IF_EXISTS; using ::c16rtomb _LIBCPP_USING_IF_EXISTS; using ::mbrtoc32 _LIBCPP_USING_IF_EXISTS; |
