From ea8c99b1d53dfec647819f809a8b0679d8a9b20e Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 3 Nov 2007 22:47:17 +0000 Subject: [PATCH] Added a sentence with a brief explanation of the intended uses of BOOST_VERIFY. [SVN r40731] --- assert.html | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/assert.html b/assert.html index e65e791..a970cef 100644 --- a/assert.html +++ b/assert.html @@ -47,13 +47,15 @@ void assertion_failed(char const * expr, char const * function, char const * fil

As is the case with <cassert>, <boost/assert.hpp> can be included multiple times in a single translation unit. BOOST_ASSERT will be redefined each time as specified above.

-

<boost/assert.hpp> also defines the macro BOOST_VERIFY. - It has exactly the same behavior as BOOST_ASSERT, except - that the expression that is passed to BOOST_VERIFY is always - evaluated.

+

<boost/assert.hpp> also defines the macro BOOST_VERIFY. + It has exactly the same behavior as BOOST_ASSERT, except that + the expression that is passed to BOOST_VERIFY is always + evaluated. This is useful when the asserted expression has desirable side + effects; it can also help suppress warnings about unused variables when the + only use of the variable is inside an assertion.


- Copyright © 2002, 2007 by Peter Dimov. 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.

+ Copyright © 2002, 2007 by Peter Dimov. 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.