Subject: Re: [boost] [config] Macro BOOST_NO_NOEXCEPT is required
From: Beman Dawes (bdawes_at_[hidden])
Date: 2011-04-24 17:37:17
On Sun, Apr 24, 2011 at 2:43 PM, Emil Dotchevski
> On Sat, Apr 23, 2011 at 11:57 AM, Takaya Saito (SubaruG)
> <gintensubaru_at_[hidden]> wrote:
>> I think the macro BOOST_NO_NOEXCEPT ( or BOOST_NO_0X_NOEXCEPT ) is
>> required soon.
>> How's the status now?
> The semantics of throw() and noexcept are not identical. Also, the
> semantics of throw() are not identical on all platforms.
I think the OP may have been asking for a macro to indicate that
"noexcept" isn't available. That's one issue.
OTOH, I think we do need a couple of macros to apply noexcept to
functions if available. I'm leaning toward BOOST_NOEXCEPT() and
You are right that such a macro shouldn't be used to blindly replace
"throw()" or even "Throws nothing", although the standard library has
been able to replace throw() in most cases. Guidelines for when and
when not to use noexcept should probably follow those used for the
standard library. See the beginning of
Conservative use of noexcept in the Library. Unfortunately, those
guidelines were hurriedly written to meet the FDIS deadline, and
aren't as clear as they could be with a bit of careful editing. They
are also missing some of the actual guidelines used for the standard
library, such as not using conditional nothrow if the condition is
even slightly complex.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk