
18 Jan
2011
18 Jan
'11
5:29 p.m.
On 1/19/2011 12:20 AM, Steven Watanabe wrote:
On 1/18/2011 9:06 AM, Thorsten Ottosen wrote:
It's to avoid writing
BOOST_ASSERT( !foo() || assertion )
which in priciple is identical to
if( foo() ) BOOST_ASSERT( assertion )
but which is not guaranteed to be removed by the compiler, whereas
BOOST_ASSERT_IF( foo(), assertion )
What exactly is wrong with BOOST_ASSERT( !foo() || assertion ) or BOOST_ASSERT( foo() ? assertion : true )
IMHO, the last thing we need is lots of minor variations that don't add any real utility.
+1 Less is more, -- Eric Niebler BoostPro Computing http://www.boostpro.com