What is the fate of wchar_t
in c++0x considering the new character types char8_t
, char16_t
, and char32_t
?
More importantly, what about std::wstring
, std::wcout
, etc?
Are the w* family classes deprecated?
Are there new std::ustring
and std::Ustring
classes for new character types?
nullptr
in all our code. – Winepresswchar_t
withchar16_t
? Withwchar_t
you might be able to hold a Unicode character (it can on my machines, sincesizeof(wchar_t)
for me is always 4), whereas with char16_t, you are guaranteed to be unable to hold a Unicode character. Why in the world would you want to do such a daft thing??? – Cleanlyint32_t
instead oflong
- because you prefer to code without the existential doubt and uncertainty of not knowing what range of values your type holds. Depending what the code does, removing possibilities might make it easier to reason about it, since all platforms will behave (closer to) the same. Also, unicode literals have typechar16_t[]
(foru
) orchar32_t[]
(forU
), not typewchar_t[]
(which isL
). I don't see the fascination with UTF-16, but some people (MS) seem to like it. – Asberryauto
, for example. – Springfield