T
thomas.r.aho
Hi all,
I have a problem with std::locale and MSVC2008 when I set the /
Zc:wchar_t- option. This setting means that the built-in type for
wchar_t is not used. Anyway, the operator(), which compares two
wstrings, works differently depending on this compiler setting. In the
example below, b should be true but evaluates to "false".
If I use the built-in type for wchar_t, it works like a dream! The
problem is that I use Qt, and this forces me to use the other compiler
setting.
Does anyone know how to get around this problem?
std::locale loc("German_germany");
//std::locale loc("Swedish_sweden");
std::wstring s1 = L"Pa";
std::wstring s2 = L"Öb";
bool b = loc(s1, s2);
/Thomas
I have a problem with std::locale and MSVC2008 when I set the /
Zc:wchar_t- option. This setting means that the built-in type for
wchar_t is not used. Anyway, the operator(), which compares two
wstrings, works differently depending on this compiler setting. In the
example below, b should be true but evaluates to "false".
If I use the built-in type for wchar_t, it works like a dream! The
problem is that I use Qt, and this forces me to use the other compiler
setting.
Does anyone know how to get around this problem?
std::locale loc("German_germany");
//std::locale loc("Swedish_sweden");
std::wstring s1 = L"Pa";
std::wstring s2 = L"Öb";
bool b = loc(s1, s2);
/Thomas