LLVM libcxx does not define the char8_t related functions, instead delegating their definitions to the underlying C library.
libcxx defines a macro called _LIBCPP_HAS_C8RTOMB_MBRTOC8 when it infers that the underlying C library provides these functions.
picolibc provides the char8_t related functions regardless of the C++ version used, but this support only landed after version 1.8.8 and, at the time of writing, has not made into any released version yet.
This is a temporary fix and should be removed when a picolibc release includes the support for char8_t and its related functions. When it's time to implement a proper solution, one needs to create logic to detect the picolibc version and define the macro accordingly. The macros that govern picolibc version are in picolibc.h.
LLVM libcxx does not define the
char8_t
related functions, instead delegating their definitions to the underlying C library.libcxx defines a macro called
_LIBCPP_HAS_C8RTOMB_MBRTOC8
when it infers that the underlying C library provides these functions.picolibc provides the
char8_t
related functions regardless of the C++ version used, but this support only landed after version 1.8.8 and, at the time of writing, has not made into any released version yet.This is a temporary fix and should be removed when a picolibc release includes the support for
char8_t
and its related functions. When it's time to implement a proper solution, one needs to create logic to detect the picolibc version and define the macro accordingly. The macros that govern picolibc version are inpicolibc.h
.