https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37475
Kristian Spangsege <kristian.spangsege at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kristian.spangsege at gmail dot co | |m --- Comment #5 from Kristian Spangsege <kristian.spangsege at gmail dot com> --- This bug still exists in GCC 10.2, while libc++ (clang) appears to do the right thing. Specifically, when passing a nonzero amount of data (from_end > from) to std::codecvt::out(), but an empty output buffer (to_end == to), the return value is "ok". According to the C++ standard (C++17), the correct return value is "partial". This appears to happen regardless of locale. In particular, it happens in the C locale. As far as I can tell, http://cplusplus.github.io/LWG/lwg-closed.html#382 is not relevant here, because the current standard text is clear (C++17), and http://cplusplus.github.io/LWG/lwg-closed.html#382 has status NAD, which I assume means "not a defect". Jonathan, let me know if I am missing something.