https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79511
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> --- I disagree with the cppreference docs. The standard says: "If (Mode & little_endian), the facet shall generate a multibyte sequence in ^^^^^^^^ little-endian order, as opposed to the default big-endian order." i.e. little_endian affects the generated sequence, i.e. the output. But maybe I'm wrong, I consider the specification of <codecvt> to be one of the worst parts of the C++ standard, it's completely unclear, and a poor API anyway. If you have a testcase that you think demonstrates a bug please provide it.