|
Boost : |
From: Ed Brey (brey_at_[hidden])
Date: 2000-06-22 16:59:30
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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk