https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88508

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
No, you can't disable it with SFINAE, because it's a runtime property. If you
define ctype<char8_t> yourself and add it to a locale at runtime, and use that
locale with the stream, then it works. We can't disable things at compile time
if the program can make them work at runtime.

You get the same behaviour trying to use a stream of char16_t or unsigned char
or std::byte or myprog::char_type. Like I said, it's not actually a problem
with UTF-8. Streams just don't support any of those types out of the box,
irrespective of the encoding they happen to use.

Reply via email to