codecvt を使用して std:wstring を std::string に変換したい
#include <ostream>
#include <sstream>
#include <locale>
#include <cstdlib>
#include <codecvt>
//some additional code
typedef std::codecvt_utf8<wchar_t> convert_typeX;
std::wstring_convert<wchar_t> converterX;
vs2012 を使用していますが、次のコンパイル エラーが発生します。
error C2825: '_Codecvt': must be a class or namespace when followed by '::'
error C2039: 'state_type' : is not a member of '`global namespace''
このすべてのエラーは、次の行のファイル xlocbuf から生成されます。
typedef typename _Codecvt::state_type state_type;
_Codevct はテンプレートとして定義されていますが、何が問題なのですか? 助けてください!