::type type; }; template< typename Pred > failed ************ (Pred::************ assert_arg( void (*)(Pred), typename assert_arg_pred::type ) ); template< typename Pred > failed ************ (boost::mpl::not_::************ assert_not_arg( void (*)(Pred), typename assert_arg_pred_not::type ) ); template< typename Pred > AUX778076_ASSERT_ARG(assert) assert_arg( void (*)(Pred), typename assert_arg_pred_not::type ); template< typename Pred > AUX778076_ASSERT_ARG(assert) assert_not_arg( void (*)(Pred), typename assert_arg_pred::type ); #else // BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER template< bool c, typename Pred > struct assert_arg_type_impl { typedef failed ************ Pred::* mwcw83_wknd; typedef mwcw83_wknd ************* type; }; template< typename Pred > struct assert_arg_type_impl { typedef AUX778076_ASSERT_ARG(assert) type; }; template< typename Pred > struct assert_arg_type : assert_arg_type_impl< BOOST_MPL_AUX_VALUE_WKND(BOOST_MPL_AUX_NESTED_TYPE_WKND(Pred))::value, Pred > { }; template< typename Pred > typename assert_arg_type::type assert_arg(void (*)(Pred), int); template< typename Pred > typename assert_arg_type< boost::mpl::not_ >::type assert_not_arg(void (*)(Pred), int); # if !defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES) template< long x, long y, bool (*r)(failed, failed) > typename assert_arg_type_impl< false,BOOST_MPL_AUX_ASSERT_RELATION(x,y,r) >::type assert_rel_arg( BOOST_MPL_AUX_ASSERT_RELATION(x,y,r) ); # else template< assert_::relations r, long x, long y > typename assert_arg_type_impl< false,assert_relation >::type assert_rel_arg( assert_relation ); # endif #endif // BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER #undef AUX778076_ASSERT_ARG BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE // BOOST_MPL_ASSERT((pred)) #define BOOST_MPL_ASSERT(pred) \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ boost::mpl::assertion_failed( \ boost::mpl::assert_arg( (void (*) pred)0, 1 ) \ ) \ ) \ ) \ /**/ // BOOST_MPL_ASSERT_NOT((pred)) #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) # define BOOST_MPL_ASSERT_NOT(pred) \ enum { \ BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ boost::mpl::assertion::failed( \ boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \ ) \ ) \ }\ /**/ #else # define BOOST_MPL_ASSERT_NOT(pred) \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ boost::mpl::assertion_failed( \ boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \ ) \ ) \ ) \ /**/ #endif // BOOST_MPL_ASSERT_RELATION(x, ==|!=|<=|<|>=|>, y) #if defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES) # if !defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER) // agurt, 9/nov/06: 'enum' below is a workaround for gcc 4.0.4/4.1.1 bugs #29522 and #29518 # define BOOST_MPL_ASSERT_RELATION_IMPL(counter, x, rel, y) \ enum { BOOST_PP_CAT(mpl_assert_rel_value,counter) = (x rel y) }; \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \ boost::mpl::assertion_failed( \ (boost::mpl::failed ************ ( boost::mpl::assert_relation< \ boost::mpl::assert_::relations( sizeof( \ boost::mpl::assert_::arg rel boost::mpl::assert_::arg \ ) ) \ , x \ , y \ >::************)) 0 ) \ ) \ ) \ /**/ # else # define BOOST_MPL_ASSERT_RELATION_IMPL(counter, x, rel, y) \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assert_rel,counter) = sizeof( \ boost::mpl::assert_::arg rel boost::mpl::assert_::arg \ ) \ ); \ BOOST_MPL_AUX_ASSERT_CONSTANT( bool, BOOST_PP_CAT(mpl_assert_rel_value,counter) = (x rel y) ); \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \ boost::mpl::assertion_failed( \ boost::mpl::assert_rel_arg( boost::mpl::assert_relation< \ boost::mpl::assert_::relations(BOOST_PP_CAT(mpl_assert_rel,counter)) \ , x \ , y \ >() ) \ ) \ ) \ ) \ /**/ # endif # define BOOST_MPL_ASSERT_RELATION(x, rel, y) \ BOOST_MPL_ASSERT_RELATION_IMPL(BOOST_MPL_AUX_PP_COUNTER(), x, rel, y) \ /**/ #else // !BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES # if defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER) # define BOOST_MPL_ASSERT_RELATION(x, rel, y) \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ boost::mpl::assertion_failed<(x rel y)>( boost::mpl::assert_rel_arg( \ boost::mpl::BOOST_MPL_AUX_ASSERT_RELATION(x,y,(&boost::mpl::operator rel))() \ ) ) \ ) \ ) \ /**/ # else # define BOOST_MPL_ASSERT_RELATION(x, rel, y) \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ boost::mpl::assertion_failed<(x rel y)>( (boost::mpl::failed ************ ( \ boost::mpl::BOOST_MPL_AUX_ASSERT_RELATION(x,y,(&boost::mpl::operator rel))::************))0 ) \ ) \ ) \ /**/ # endif #endif // BOOST_MPL_ASSERT_MSG( (pred::value), USER_PROVIDED_MESSAGE, (types) ) #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) # define BOOST_MPL_ASSERT_MSG_IMPL( counter, c, msg, types_ ) \ struct msg; \ typedef struct BOOST_PP_CAT(msg,counter) : boost::mpl::assert_ \ { \ using boost::mpl::assert_::types; \ static boost::mpl::failed ************ (msg::************ assert_arg()) types_ \ { return 0; } \ } BOOST_PP_CAT(mpl_assert_arg,counter); \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \ boost::mpl::assertion<(c)>::failed( BOOST_PP_CAT(mpl_assert_arg,counter)::assert_arg() ) \ ) \ ) \ /**/ #else # define BOOST_MPL_ASSERT_MSG_IMPL( counter, c, msg, types_ ) \ struct msg; \ typedef struct BOOST_PP_CAT(msg,counter) : boost::mpl::assert_ \ { \ static boost::mpl::failed ************ (msg::************ assert_arg()) types_ \ { return 0; } \ } BOOST_PP_CAT(mpl_assert_arg,counter); \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \ boost::mpl::assertion_failed<(c)>( BOOST_PP_CAT(mpl_assert_arg,counter)::assert_arg() ) \ ) \ ) \ /**/ #endif #define BOOST_MPL_ASSERT_MSG( c, msg, types_ ) \ BOOST_MPL_ASSERT_MSG_IMPL( BOOST_MPL_AUX_PP_COUNTER(), c, msg, types_ ) \ /**/ #endif // BOOST_MPL_ASSERT_HPP_INCLUDED