From: Hans Dembinski (hans.dembinski_at_[hidden])
Date: 2019-10-25 10:16:56
> On 24. Oct 2019, at 18:47, Robert Ramey via Boost <boost_at_[hidden]> wrote:
> I want to detect whether or not the -no_exception compile time flag has been used on gcc/clang. Will BOOST_NO_EXCEPTIONS do this? If not is there something I can use?
Yes, it does. I would not set this compiler flag by hand, you can use b2 exception-handling=off.
If you use the BOOST_THROW_EXCEPTION macro, you normally do not need to use BOOST_NO_EXCEPTIONS directly. I use BOOST_NO_EXCEPTIONS in some unit tests of throws to avoid warnings about unused variables. Often it is not needed there as well. BOOST_TEST_THROW from boost/core/lightweight_test.hpp automatically expands to a nothing when BOOST_NO_EXCEPTIONS is set, for example.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk