07/08/22 00:15:12
たまにはsizeof (wchar_t) == 4でUCS-4/UTF-32な奴らも忘れないで。
>>82
std::basic_string<uint32_t> u32(const wchar_t*);のような関数を定義しておけば、
これくらいにはできる。
typedef std::basic_string<uint32_t> u32string;
u32string s = u32(L"hogehoge");
Win32 APIの_TやTEXTマクロみたいなもんだと思えばたいしたことはない、ってダメ?
それはともかく、C++0xにはchar16_tやchar32_tなる型が入るらしいよ。
URLリンク(www.open-std.org)
スレリンク(tech板:372-番)