Boost logo

Boost :

From: Caleb Epstein (caleb.epstein_at_[hidden])
Date: 2004-12-21 10:19:40

On Tue, 21 Dec 2004 10:49:56 -0000, John Maddock <john_at_[hidden]> wrote:
> > Would it be better to test for _GLIBCPP_HAVE_WCHAR_H instead of
> > sun/__sun though?
> Or maybe all three: do you know if this is an issue for sun's compiler as
> well? I'm assuming that wchar.h is provided by the platform rather than by
> gcc?

Sun's compiler (at least the version I have) is a whole 'nother set of
problems. It fails probably 90% of the tests in the regression suite,
largely due to its marginal template support. The test in question
(crc) actually causes an ICE with Sun C++ (

<wchar.h> is a system header available in /usr/include so it is usable
with either compiler. The Sun compiler does provide a <cwchar>
header, but gcc does not provide it (nor std::wstring nor any wide
stream support) due to the omission of some C99 standard library
functions (cf.
I would expect that a future release of gcc may fix this issue, since
the missing functions are apparently not needed by libstdc++ for its
wide support.

The platform-specific test for sun/__sun will work for any compiler on
this platform, but if there is perhaps some *other* oddball platform
out there for which gcc doesn't provide full wide support, then the
_GLIBC**_HAVE_WCHAR_H test would catch those as well.

Caleb Epstein
caleb dot epstein at gmail dot com

Boost list run by bdawes at, gregod at, cpdaniel at, john at