https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112607
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- The standard tries quite hard to avoid this kind of specialization: https://eel.is/c++draft/format.formatter.spec#note-1 But I suppose you can contrive this kind of custom formatter, or the inverse, i.e. std::formatter<std::basic_string<char, mytraits>, wchar_t>