Boost logo

Boost :

Subject: Re: [boost] [numeric] Applying trivial bugfix
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2012-02-28 13:20:50


Le 28/02/12 18:16, Robert Ramey a écrit :
> Iain Denniston wrote:
>>> Fix is trivial and well known: replace throw x; with
>>> BOOST_THROW_EXCEPTION(x); in a converter_policies.hpp file. But the
>>> library maintainer does not like BOOST_THROW_EXCEPTION because of
>>> code bloat.
>> Perhaps what would be better would be to have a macro for "simple"
>> exceptions that could be added in whatever file(s)
>> BOOST_THROW_EXCEPTIONs definition exists
>> (BOOST_THROW_SIMPLE_EXCEPTION? BOOST_THROW_UNMODIFIED_EXCEPTION?
>> BOOST_THROW_RAW_EXCEPTION? not sure any of those names work). All if would
>> do would throw the exception if
>> exceptions are enabled or call the function otherwise - I'm sure this
>> could be used in many other places and would avoid having an abundance
>> of practically identical statement blocks.
> That's the way it was originally. Then the implementation of
> BOOST_THROW_EXCEPTION got changed creating unexpected behavior and side
> effects in all the libraries which used. So...
I don't remember why this was done. We should never accept changes as
this one.
>
> Maybe we can make BOOST_HANDLE_EXCEPTION to reinstall
> the initial behavior. However this time, it should only be writable
> in the SVN system by a strictly limited group of people who
> know that changing the implementation of something already
> in wide usage is not a good idea for lots of reasons.
>
>
+1 for a simple macro that works as the initial version.
Vicente


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