Boost logo

Boost :

Subject: [boost] [c++1] BOOST_NOEXCEPT macros?
From: Beman Dawes (bdawes_at_[hidden])
Date: 2011-10-08 16:34:13

Since Boost already has BOOST_NO_NOEXCEPT and at least one compiler
(GCC) supports C++11 noexcept, I'd like to start using it in Boost

So how about a <boost/detail/noexcept.hpp> header with the usual
boilerplate and this:

# define BOOST_NOEXCEPT_IF(Predicate)
# define BOOST_NOEXCEPT no_except
# define BOOST_NOEXCEPT_IF(Predicate) no_except(Predicate)

As was pointed out in a previous thread, there isn't any reliable
C++03 alternative for either of these two, so nothing is attempted,
and that's OK in C++03 code.

We could also define BOOST_NOEXCEPT_OPERATOR(Predicate), and have it
fall back to true in C++03 code. I'm not expert enough to know if that
is reliable or even useful, so am not proposing it.



Boost list run by bdawes at, gregod at, cpdaniel at, john at