Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-10-29 13:04:36

> Steven Watanabe wrote:
>> template<class T>
>> void use_variable(const T&) {}
>> #define BOOST_ASSERT(x) normal implementation
>> #else
>> #define BOOST_ASSERT(x) use_variable(x)
>> #endif
> Looks good to me :-)
> @Peter: You are listed as the author of assert.hpp, do you think
> this could be done? Or will this disable the compilers optimizer,
> so he can do away with the return value?
> Roland aka speedsnail

This doesn't seem to do what you want.

BOOST_ASSERT( this_takes_time() ); // breaking change

The introduction of BOOST_VERIFY with a similar implementation would
probably be best.

    #define BOOST_VERIFY(x) ((void)(x))

Boost list run by bdawes at, gregod at, cpdaniel at, john at