Boost logo

Boost :

Subject: Re: [boost] Boost and exceptions
From: Robert Ramey (ramey_at_[hidden])
Date: 2012-06-19 18:21:45


Daniel James wrote:
> On 19 June 2012 18:11, Robert Ramey <ramey_at_[hidden]> wrote:
>>
>> According to
>> http://www.boost.org/doc/libs/1_49_0/libs/config/doc/html/boost_config/boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_c__03_defects
>>
>> "The compiler does not support exception handling (this setting is
>> typically required by many C++ compilers for embedded platforms).
>> Note that there is no requirement for boost libraries to honor this
>> configuration setting - indeed doing so may be impossible in some
>> cases. Those libraries that do honor this will typically abort if a
>> critical error occurs - you have been warned!"
>>
>> a) This definition is in the current and all past documentation and
>> should be respected by all code
>> which uses the macro BOOST_NO_EXCEPTIONS
>
>> From
>> http://www.boost.org/doc/libs/1_31_0/libs/utility/throw_exception.html
>
> "It is intended to be used in Boost libraries that need to throw
> exceptions, but support configurations and platforms where exceptions
> aren't available, as indicated by the presence of the
> BOOST_NO_EXCEPTIONS configuration macro."
>
> Suggests that the config documentation isn't in line with how it's
> been used for the past nine years.
>
>> b) boost::throw_exception should be rolled back to it's orginal
>> meaning.
>>
>> Reason:The problem here is that using something from the main boost
>> namespace creates
>> and unexpected and hidden dependency on another library. This occcurs
>> without the library
>> user getting notified at all. Much care has been expended so that
>> those things directly inside
>> the boost namespace (excluding convenience headers) be things which
>> DO NOT create
>> dependencies on other libraries. The current definition of
>> boost::throw_exception is the only
>> exception to this.
>
> That's an odd claim to make. Look at: boost::any, boost::array,
> boost::bimap etc.
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost


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