Boost logo

Boost :

Subject: Re: [boost] Boost and exceptions
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2012-06-23 19:33:54


AMDG

On 06/23/2012 04:33 PM, Robert Ramey wrote:
> Agustín K-ballo Bergé wrote:
>> Would you happen to know which compilers implement n3242 already?
>> Boost.Exception works for me with the compilers I use everyday, as
>> long as the original exception was thrown with enable_current_exception.
>
> hmm - I really don't know. It looks like boost exception implements
> this functionality for those compilers which don't have it. Actually
> this is really good thing in my opinion. If this were a separate
> library part of the boost directory/namespace I think it would be
> good addition.
>
> But this facility is included in the same library as another facility
> useful to users. So addressing of one problem - non-conforming
> compilers is not orthogonal to the other problem - helpful facilities
> for users. It's not fine grained enough for my taste.
>

Sure it is. There are three separate pieces:

1) throw boost::enable_error_info(e) adds
   boost::exception.
2) throw boost::enable_current_exception(e)
   adds the information needed for
   boost::current_exception.
3) boost::throw_exception is implemented
   in terms of both (1) and (2).

In Christ,
Steven Watanabe


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