Boost logo

Boost :

Subject: Re: [boost] [config] Proposed BOOST_NOEXCEPT_NOTHROW macro
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2012-08-28 18:27:40


Le 28/08/12 23:22, Beman Dawes a écrit :
> The three current BOOST_NOEXCEPT* macro variants miss the case where
> C++03 code has a "throw()" throw-specifier. Classes that derive from
> standard library exceptions need this to avoid breaking code on C++03
> compilers.
>
> I'm not enamored with the BOOST_NOEXCEPT_NOTHROW name, so feel free to
> offer suggestions for alternate names.
>
> Here is the full set of macros:
>
> #ifdef BOOST_NO_NOEXCEPT
> # define BOOST_NOEXCEPT
> # define BOOST_NOEXCEPT_NOTHROW throw() <---- new macro
> # define BOOST_NOEXCEPT_IF(Predicate)
> # define BOOST_NOEXCEPT_EXPR(Expression) false
> #else
> # define BOOST_NOEXCEPT noexcept
> # define BOOST_NOEXCEPT_NOTHROW noexcept <---- new macro
> # define BOOST_NOEXCEPT_IF(Predicate) noexcept((Predicate))
> # define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression))
> #endif
>
> Unless there are objections, I'll commit the changes Wednesday
> afternoon Eastern US time.
>
I have no major problem with the additional macro BOOST_NOEXCEPT_NOTHROW
, but I don't see why it should be committed so quickly.
I will cal it BOOST_NOEXCEPT_OR_NOTHROW.

My question is what macro will you use you implement noexcept in
Boost.System. If you don't want to break c++03 compilers I think it
should be BOOST_NOEXCEPT. Could you confirm?

Best,
Vicente


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