Boost logo

Boost :

Subject: [boost] noexcept BOOST_EXPLICIT_OPERATOR_BOOL
From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2014-04-25 11:09:03


Hi,
Although I am not entirely convinced that any not throwing function (except
for moves) should be marked as noexcept, I can see that noexcept starts to
get into Boost. explicit operator bool appears to be a good candidate, but
macro BOOST_EXPLICIT_OPERATOR_BOOL does not offer it. So I have to choose:
use the macro or noexcept.

Perhaps the macro could be expanded to give an option to add noexcept, but
that would spawn two macros
(BOOST_EXPLICIT_OPERATOR_BOOL and BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL)
into four.

Are four macros for almost the same purpose acceptable? Or do I have to
abandon the idea of making the operator noeaxcept. Are there any
recommendations?

Regards,
&rzej


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