https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37475
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Kristian Spangsege from comment #7) > Curiously, this bug does not occur when using the Cygwin or MinGW versions > of GCC. In these cases, the result is `partial` as it should be. I assume > this is because on Cygwin and MinGW, libstdc++ uses a generic locale > implementation that is different from the one ordinarily used on Linux. It has an explicit check for this condition: // It is not clear that __from < __from_end implies __ret != ok // (see DR 382). if (__ret == ok && __from < __from_end) __ret = partial;