[Bug libstdc++/50714] codecvt_byname::codecvt::_M_c_locale_codecvt not initialized by destroyed

paolo.carlini at oracle dot com gcc-bugzilla@gcc.gnu.org
Fri Oct 14 09:44:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50714

--- Comment #11 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-14 09:44:05 UTC ---
Note that a codecvt constructor taking (__c_local, size_t) isn't Standard, we
don't want it in the primary. If you ask me, not having written this code, I
think the cleanest thing to do is simply not defining anything for the primary
codecvt_byname and then add two specializations (4 in C++11) quite similar to
what we have now in the primary, possibly cleaned-up a bit per your second
point. That also solves the apparent "C" locale weirdness, etc (for "C"
everything is statically constructed, no work is necessary). This is
enhancement work, of course, nobody touched (neither reported bugs for ;) this
code for years, and years. All in all, I would recommend doing this as part of
C++11 work within a new ABI (then for better compile-time diagnostics we'll
also have the option of using deleted special members unconditionally, etc)



More information about the Gcc-bugs mailing list