diff --git a/assert.html b/assert.html
index 4723ff8..e1c5b4f 100644
--- a/assert.html
+++ b/assert.html
@@ -22,6 +22,7 @@
BOOST_ASSERT_MSG
BOOST_VERIFY
BOOST_VERIFY_MSG
+ BOOST_ASSERT_IS_VOID
BOOST_ASSERT_MSG(expr,msg)
when it's not.
+
The macro BOOST_ASSERT_IS_VOID
is defined when BOOST_ASSERT
and BOOST_ASSERT_MSG
, are expanded to ((void)0)
.
+ This macro is useful to avoid compiling and potentially running code that is only intended to prepare data to be used in the assertion.
++ + ++void MyContainer::erase(iterator i) +{ + //Some sanity checks, data must be ordered + #ifndef BOOST_ASSERT_IS_VOID + if(i != c.begin()){ + iterator prev = i; + --prev; + BOOST_ASSERT(*prev < *i); + } + else if(i != c.end()){ + iterator next = i; + ++next; + BOOST_ASSERT(*i < *next); + } + #endif + this->erase_impl(i); +} ++
• By default, BOOST_ASSERT_IS_VOID
is defined if NDEBUG
is defined.
• If the macro BOOST_DISABLE_ASSERTS
is defined BOOST_ASSERT_IS_VOID
is always defined.
• If the macro BOOST_ENABLE_ASSERT_HANDLER
is defined BOOST_ASSERT_IS_VOID
is never defined.
• If the macro BOOST_ENABLE_ASSERT_DEBUG_HANDLER
, then BOOST_ASSERT_IS_VOID
is defined when NDEBUG
is defined.
Copyright © 2002, 2007, 2014 by Peter Dimov. Copyright © 2011 - by Beman Dawes. Distributed under the Boost Software + by Beman Dawes. Copyright © 2015 by Ion Gaztanaga. Distributed under the Boost Software License, Version 1.0. See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.