
9 Apr
2011
9 Apr
'11
7:41 p.m.
Olaf van der Spek wrote:
It has exactly the same behavior as BOOST_ASSERT, except that the expression that is passed to BOOST_VERIFY is always evaluated.
Does it just evaluate the expression or does it also fail is it evaluates to false?
It fails, just as BOOST_ASSERT does. The only difference is that the expression is evaluated.
Why is there no BOOST_VERIFY_MSG?
There wasn't any demand, I guess. I can rationalize its absence as follows: if the side effects of the expression are significant, one probably doesn't feel a need to add a message, as the expression itself is descriptive enough.