I'm calling the member function 'out' on a particular instantiation of the codecvt template. For this instantiation the behavior of this member function does not match the standard's specifications. The standard states that if 'out' returns the value 'noconv' then the internal character type and the external character type of the codecvt are the same (C++11 ยง 22.4.1.4.2 p2). I am receiving this return value but the internal and external character types for my codecvt instantiation are not the same.Here's a snippet of the code I'm using that demonstrates the bug: typedef char32_t CharT; typedef char_traits<CharT>::state_type StateT; typedef codecvt<CharT,char,StateT> CodecvtT; std::locale l; if (has_facet<CodecvtT>(l)) { CodecvtT const &a_codecvt = use_facet<CodecvtT>(l); StateT state = StateT(); CharT A[] = {'H'}; CharT const *a; char B[4] = {}; char *b; auto result = a_codecvt.out(state,A,A+1,a,B,B+1,b); if (CodecvtT::noconv == result) { assert(typeid(CharT)==typeid(char)); } }
Visual Studio/Team Foundation Server/.NET Framework Tooling version
Steps to reproduce
Product Language
Operating System
Operating System Language
Actual results
Expected results
Please wait...