codecvt_byname(const char* __s, size_t __refs = 0)
: codecvt<_InternT, _ExternT, _StateT>(__refs)
{
- _S_destroy_c_locale(this->_M_c_locale_codecvt);
- _S_create_c_locale(this->_M_c_locale_codecvt, __s);
+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
+ {
+ _S_destroy_c_locale(this->_M_c_locale_codecvt);
+ _S_create_c_locale(this->_M_c_locale_codecvt, __s);
+ }
}
protected: