Ticket #2262: boost_assert_fix.diff

File boost_assert_fix.diff, 1.7 KB (added by Juan Jesús García de Soria Lucena <juanj.g_soria@…>, 13 years ago)

Patch to assert.hpp, fixing BOOST_MPL_ASSERT_MSG link errors.

  • assert.hpp

    old new  
    330330
    331331// BOOST_MPL_ASSERT_MSG( (pred<x,...>::value), USER_PROVIDED_MESSAGE, (types<x,...>) )
    332332
    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_ )  \
    335334struct 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); \
    342335BOOST_MPL_AUX_ASSERT_CONSTANT( \
    343336      std::size_t \
    344337    , 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 ) \
    346339        ) \
    347340    ) \
    348341/**/
    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
    365343
    366344#define BOOST_MPL_ASSERT_MSG( c, msg, types_ ) \
    367345BOOST_MPL_ASSERT_MSG_IMPL( BOOST_MPL_AUX_PP_COUNTER(), c, msg, types_ ) \