This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: 4 byte wchar_t and portability
>>>>> "Martin v. Loewis" <martin@loewis.home.cs.tu-berlin.de>:
>> I take it that making sizeof(wchar_t)=4 in gcc 3.0 is pretty much a
>> given?
> It depends on the platform. For svr3, svr4, Linux, and others, it is
> given, for win32, sizeof(wchar_t) is 2.
I'm curious: what's the rationale for making the C++ wchar_t platform
dependent?
This decision will make it a bitch to use std::wstring for application
programmers, for instance when interfacing to other wide string types
like eg. QString from Qt.
I guess the only way is to typedef your own unsigned short (or
whatever) char type, and use basic_string<> of this type...?
Of course, then you're shot wrt. text constants...:-/