Xerces-c and cross-platform string literals
问题 I'm porting a code-base that uses Xerces-c for XML processing from Windows/VC++ to Linux/G++. On Windows, Xerces-c uses wchar_t as the character type XmlCh . This has allowed people to use std::wstring and string literals of L"" syntax. On Linux/G++, wchar_t is 32-bit and Xerces-c uses unsigned short int (16-bit) as the character type XmlCh . I've started out along this track: #ifdef _MSC_VER using u16char_t = wchar_t; using u16string_t = std::wstring; #elif defined __linux using u16char_t =