Ticket #2262: boost_assert_fix.diff
File boost_assert_fix.diff, 1.7 KB (added by , 13 years ago) |
---|
-
assert.hpp
old new 330 330 331 331 // BOOST_MPL_ASSERT_MSG( (pred<x,...>::value), USER_PROVIDED_MESSAGE, (types<x,...>) ) 332 332 333 #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) 334 # define BOOST_MPL_ASSERT_MSG_IMPL( counter, c, msg, types_ ) \ 333 #define BOOST_MPL_ASSERT_MSG_IMPL( counter, c, msg, types_ ) \ 335 334 struct msg; \ 336 typedef struct BOOST_PP_CAT(msg,counter) : boost::mpl::assert_ \337 { \338 using boost::mpl::assert_::types; \339 static boost::mpl::failed ************ (msg::************ assert_arg()) types_ \340 { return 0; } \341 } BOOST_PP_CAT(mpl_assert_arg,counter); \342 335 BOOST_MPL_AUX_ASSERT_CONSTANT( \ 343 336 std::size_t \ 344 337 , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \ 345 boost::mpl::assertion <(c)>::failed( BOOST_PP_CAT(mpl_assert_arg,counter)::assert_arg()) \338 boost::mpl::assertion_failed<(c)>( (boost::mpl::failed ************ (msg::************) types_) 0 ) \ 346 339 ) \ 347 340 ) \ 348 341 /**/ 349 #else 350 # define BOOST_MPL_ASSERT_MSG_IMPL( counter, c, msg, types_ ) \ 351 struct msg; \ 352 typedef struct BOOST_PP_CAT(msg,counter) : boost::mpl::assert_ \ 353 { \ 354 static boost::mpl::failed ************ (msg::************ assert_arg()) types_ \ 355 { return 0; } \ 356 } BOOST_PP_CAT(mpl_assert_arg,counter); \ 357 BOOST_MPL_AUX_ASSERT_CONSTANT( \ 358 std::size_t \ 359 , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \ 360 boost::mpl::assertion_failed<(c)>( BOOST_PP_CAT(mpl_assert_arg,counter)::assert_arg() ) \ 361 ) \ 362 ) \ 363 /**/ 364 #endif 342 365 343 366 344 #define BOOST_MPL_ASSERT_MSG( c, msg, types_ ) \ 367 345 BOOST_MPL_ASSERT_MSG_IMPL( BOOST_MPL_AUX_PP_COUNTER(), c, msg, types_ ) \