From e9ff763d7975447b421b3fb40fc019e0a4e9a90d Mon Sep 17 00:00:00 2001 From: Glen Fernandes Date: Sat, 2 May 2020 09:34:29 -0400 Subject: [PATCH] Evaluate expression when BOOST_NO_EXCEPTIONS is defined --- doc/lightweight_test.qbk | 3 +-- include/boost/core/lightweight_test.hpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/lightweight_test.qbk b/doc/lightweight_test.qbk index 031a6dc..9103752 100644 --- a/doc/lightweight_test.qbk +++ b/doc/lightweight_test.qbk @@ -220,8 +220,7 @@ If `BOOST_NO_EXCEPTIONS` is *not* defined and if `expr` throws an exception, increases the error count and outputs a message containing the expression and (if possible) the exception message. -If `BOOST_NO_EXCEPTIONS` is defined, this macro expands to nothing and `expr` -is not evaluated. +If `BOOST_NO_EXCEPTIONS` is defined, `expr` is evaluated. [endsect] diff --git a/include/boost/core/lightweight_test.hpp b/include/boost/core/lightweight_test.hpp index 23f5c52..43507ad 100644 --- a/include/boost/core/lightweight_test.hpp +++ b/include/boost/core/lightweight_test.hpp @@ -494,7 +494,7 @@ inline int report_errors() } // #else -# define BOOST_TEST_NO_THROW(EXPR) +# define BOOST_TEST_NO_THROW(EXPR) { EXPR; } #endif #endif // #ifndef BOOST_CORE_LIGHTWEIGHT_TEST_HPP