Boost logo

Boost :

Subject: Re: [boost] [Boost.Config] Stlport patch for Sun compilers on Linux
From: Peter Dimov (pdimov_at_[hidden])
Date: 2008-09-09 16:09:48


K. Noel Belcourt:
> Hi,
>
> I've attached a patch to fix this error with the sun compilers on Linux.
>
> http://tinyurl.com/6o4fxg
>
> I'm not well versed with the subtleties of Stlport (there may be
> better ways to code this). The patch merely avoids defining macro
> BOOST_NO_EXCEPTION_STD_NAMESPACE as the Stlport bundled with the Sun
> compilers on Linux seems to correctly put all type_info into the std
> namespace. The Sun compilers on Solaris still require this macro
> definition.

There is something wrong with these macros and their use.
BOOST_NO_EXCEPTION_STD_NAMESPACE should ostensibly be defined when there is
no std::exception. But there are places in Boost, throw_exception.hpp and
detail/bad_weak_ptr.hpp for example, that use std::exception, without
checking the macro. Many libraries include, directly or indirectly, one of
these two headers. If the macro is correctly set for Sun CC on Solaris, they
should fail to compile. But the absence of bug reports implies that they
don't.

The only compiler I know of that doesn't have type_info in std is Embedded
VC++ 4.2; it is what prompted me to ask for the addition of
BOOST_NO_STD_TYPEINFO to make shared_ptr compile. Even eVC++ 4.2 is able to
eat std::exception though (if I recall).


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