http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50714
--- Comment #12 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-10-14
10:14:10 UTC ---
The testcase is invalid, std types can only be specialized for user-defined
types. It can be made valid by:
#include <ext/pod_char_traits.h>
#define mychar __gnu_cxx::character<unsigned short, int>
> It's also odd to not destroy or initialize(!) the locale in codecvt_byname
> if the requested locale is "C" or "POSIX". Thus I suppose using
>
> explicit
> codecvt_byname(const char* __s, size_t __refs = 0)
> : codecvt<_InternT, _ExternT, _StateT>("C", __refs)
>
> (well, with a proper __c_locale object for "C") would be even better?
Or simply initialize it in the primary template the same way the
specializations do it, with _S_get_c_locale()