Boost logo

Boost :

From: Beman Dawes (beman_at_[hidden])
Date: 2000-06-23 10:49:12


At 04:59 PM 6/22/2000 -0500, Ed Brey wrote:

>From: <jsiek_at_[hidden]>
>>
>> I suppose this means that boost/config.hpp should be modified
>> to only do the using ::wchar_t for non-conforming compilers.
>>
>> scleary_at_[hidden] writes:
>> > Under C++, wchar_t is a builtin type, like int, so it can't be in
>a using
>> > declaration.
>
>wchar_t should not be in namespace std in any case. The "using
>::size_t", etc. is a workaround only for non-conforming compilers that
>fail to put items into std. In the case of wchar_t, the
>non-conforming compilers have it right to begin with, by putting the
>name in the global namespace.
>
>Well, they almost have it right. The problem with wchar_t is that, as
>a keyword, no include directive should be necessary to get it. So the
>real workaround is to make sure that the file that defines wchar_t as
>a typedef (albeit non-conformingly) is included. It turns out that
>including the file <cstddef> defines the typedef in question (at least
>for VC6), and we happen include that file anyway to detect the
>standard library implementation type.
>
>So, when everything is said and done, we can just remove, the "using
>::wchar_t;" from config.hpp and make sure we don't have any references
>to "std::wchar_t" in any of our code, and everything should work
>hunky-dory.

Done, since the impact is minimal.

But I really wonder if there is any hope for a compiler that is so
out-of-date that it doesn't support wchar_t.

--Beman


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk