Re: [Boost-bugs] [Boost C++ Libraries] #3286: assert()-like functionality in release mode

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3286: assert()-like functionality in release mode
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-07-08 20:48:28


#3286: assert()-like functionality in release mode
-----------------------------------------------+---------------------------
  Reporter: Olaf van der Spek <OlafvdSpek@…> | Owner: No-Maintainer
      Type: Feature Requests | Status: closed
 Milestone: Boost 1.41.0 | Component: utility
   Version: Boost 1.39.0 | Severity: Problem
Resolution: fixed | Keywords:
-----------------------------------------------+---------------------------
Changes (by Andrey Semashev):

 * status: new => closed
 * resolution: => fixed

Comment:

 There is the `BOOST_VERIFY(x)` macro, which is expands to `x` in release
 builds and `BOOST_ASSERT(x)` in debug. There is also `BOOST_VERIFY_MSG`.
 Note that these macros do not implement error handling in release builds.

 If you want to do an actual error handling in release (e.g. abort in case
 of error) then asserts are not the right tool for this, IMO. Use
 exceptions or explicitly spell out the error handling behavior.

-- 
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/3286#comment:6>
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-07-08 20:51:21 UTC