https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98725
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> --- We could make codecvt<wchar_t, char, mbstate_t> work if we assume that wchar_t contains UTF-32 or UTF-16 (depending on the size of wchar_t) and reuse the specializations for char32_t and char16_t. Those specializations are implemented entirely in libstdc++ with no libc help. It's unclear (to me) whether --disable-wchar_t is used explicitly to produce a smaller libstdc++ build, without wchar_t instantiations, or is just used implicitly on systems where the libc <wchar.h> support is missing. So it's hard to know whether "emulate wchar_t support in terms of UTF-32" is desirable, or if that would frustrate users explicitly trying to get a smaller library. Presumably anybody who wants a smaller library would also want to disable the codecvt facets for char32_t and char16_t, but nobody has requested that. I'm not going to spend any more time on it after enabling wide strings and some type traits.