4 std::wifstream wif(filename);
8 +#pragma GCC diagnostic push
9 +#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
11 wif.imbue(std::locale(std::locale(), new std::codecvt_utf8<wchar_t>));
13 +#pragma GCC diagnostic pop
15 std::wstringstream wss;
19 MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, wstr.get(), nSize);
21 #elif !defined NUMBERTEXT_BOOST
23 +#pragma GCC diagnostic push
24 +#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
26 typedef std::codecvt_utf8<wchar_t> convert_type;
27 std::wstring_convert<convert_type, wchar_t> converter;
29 +#pragma GCC diagnostic pop
31 return converter.from_bytes( s );
33 return ::locale::conv::utf_to_utf<wchar_t>(s.c_str(), s.c_str() + s.size());
35 WideCharToMultiByte(CP_UTF8, 0, s.c_str(), -1, str.get(), nSize, nullptr, nullptr);
37 #elif !defined NUMBERTEXT_BOOST
39 +#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
41 typedef std::codecvt_utf8<wchar_t> convert_type;
42 std::wstring_convert<convert_type, wchar_t> converter;
43 return converter.to_bytes( s );