KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
GCC supports -fshort-wchar that switches wchar_t from 4, to two bytes. What is the best way to detect the size of wchar_t at compile time, so I can map it correctly to the appropriate utf-16 or utf-32 type? At least, until c++0x is released and gives us stable utf16_t and utf_32_t typedefs. #if ?what_goes_here? typedef wchar_t Utf32; typedef unsigned short Utf16; #else typedef wchar_t Utf16; typedef unsigned int Utf32; #endif
Tags (comma-separated)
Save Edits
Cancel