Boost logo

Boost :

Subject: Re: [boost] [Boost.Config] Stlport patch for Sun compilers on Linux
From: K. Noel Belcourt (kbelco_at_[hidden])
Date: 2008-09-09 16:55:41


On Sep 9, 2008, at 2:09 PM, Peter Dimov wrote:

> 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).

Okay, seems like we need to fix function_base.hpp to key off of
BOOST_NO_STD_TYPEINFO rather than BOOST_NO_EXCEPTION_STD_NAMESPACE.
With the attached patch to function_base.hpp, the both Sun and gcc
compilers under Solaris and Linux are happy and there're no changes
necessary to Boost.Config.

Is this what you had in mind?

-- Noel




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