https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98725
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- Locales, fstream, std::wregex, and filesystem::path need wchar_t support in libc, so they should still depend on _GLIBCXX_USE_WCHAR_T. Numeric conversions (std::stoi, std::stol etc.) need libc support. It makes sense to suppress the explicit instantiations of std::wstring etc in the library if --disable-wchar_t is used. wstringstream and friends could probably be made to work. I'm not going to try for now.