
29 Oct
2007
29 Oct
'07
6:35 p.m.
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() ); }