Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7028: NDEBUG should disable asserts even if BOOST_ENABLE_ASSERT_HANDLER is defined
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-03-14 21:35:17
#7028: NDEBUG should disable asserts even if BOOST_ENABLE_ASSERT_HANDLER is
defined
--------------------------------------+-------------------------------------
Reporter: mgaunard | Owner: viboes
Type: Bugs | Status: assigned
Milestone: To Be Determined | Component: utility
Version: Boost Development Trunk | Severity: Problem
Resolution: | Keywords: BOOST_ASSERT assert BOOST_ENABLE_ASSERT_HANDLER NDEBUG
--------------------------------------+-------------------------------------
Comment (by viboes):
Replying to [comment:4 eric_niebler]:
> I'm opposed to the suggested resolution, until I hear a better reason.
If you don't want your assert handler invoked in release builds, then
don't define `BOOST_ENABLE_ASSERT_HANDLER`. Simple.
>
> As the code is now, it is possible to turn `BOOST_ASSERT` into something
like an `ENSURE` macro that leaves the checks in, even for release builds.
This is important in safety-critical applications -- exactly the same
applications where a custom assert handler makes the most sense.
There is already BOOST_VERIFY for this purpose. What am I missing?
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7028#comment:5> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:12 UTC