Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-10-29 14:35:29


> Peter Dimov wrote:
>
>> The introduction of BOOST_VERIFY with a similar implementation would
>
> What is with
> BOOST_VERIFY(EDOM != Func())
>
> Will this work as expected?
>
> Roland aka speedsnail

I think that it will. You can try it out and see if it matches your
expectations:

#include <boost/assert.hpp>

#if defined(BOOST_DISABLE_ASSERTS) || (
!defined(BOOST_ENABLE_ASSERT_HANDLER) && defined(NDEBUG) )

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

#else

#define BOOST_VERIFY( x ) BOOST_ASSERT( x )

#endif

#include <iostream>
#include <cerrno>

int f()
{
    std::cout << "f()\n";
    return 0;
}

int main()
{
    BOOST_VERIFY( EDOM != f() );
}


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk