123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370 |
- || (BOOST_MPL_CFG_GCC != 0) \
- || BOOST_WORKAROUND(__IBMCPP__, <= 600)
- || BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \
- || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
- || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840))
- || (BOOST_MPL_CFG_GCC != 0)
- BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
- struct failed {};
- template< bool C > struct assert { typedef void* type; };
- template<> struct assert<false> { typedef AUX778076_ASSERT_ARG(assert) type; };
- template< bool C >
- int assertion_failed( typename assert<C>::type );
- template< bool C >
- struct assertion
- {
- static int failed( assert<false> );
- };
- template<>
- struct assertion<true>
- {
- static int failed( void* );
- };
- struct assert_
- {
- template< typename T1, typename T2 = na, typename T3 = na, typename T4 = na > struct types {};
- static assert_ const arg;
- enum relations { equal = 1, not_equal, greater, greater_equal, less, less_equal };
- };
- bool operator==( failed, failed );
- bool operator!=( failed, failed );
- bool operator>( failed, failed );
- bool operator>=( failed, failed );
- bool operator<( failed, failed );
- bool operator<=( failed, failed );
- template< bool (*)(failed, failed), long x, long y > struct assert_relation {};
- template< BOOST_MPL_AUX_NTTP_DECL(long, x), BOOST_MPL_AUX_NTTP_DECL(long, y), bool (*)(failed, failed) >
- struct assert_relation {};
- boost::mpl::aux::weighted_tag<1>::type operator==( assert_, assert_ );
- boost::mpl::aux::weighted_tag<2>::type operator!=( assert_, assert_ );
- boost::mpl::aux::weighted_tag<3>::type operator>( assert_, assert_ );
- boost::mpl::aux::weighted_tag<4>::type operator>=( assert_, assert_ );
- boost::mpl::aux::weighted_tag<5>::type operator<( assert_, assert_ );
- boost::mpl::aux::weighted_tag<6>::type operator<=( assert_, assert_ );
- template< assert_::relations r, long x, long y > struct assert_relation {};
- template< bool > struct assert_arg_pred_impl { typedef int type; };
- template<> struct assert_arg_pred_impl<true> { typedef void* type; };
- template< typename P > struct assert_arg_pred
- {
- typedef typename P::type p_type;
- typedef typename assert_arg_pred_impl< p_type::value >::type type;
- };
- template< typename P > struct assert_arg_pred_not
- {
- typedef typename P::type p_type;
- BOOST_MPL_AUX_ASSERT_CONSTANT( bool, p = !p_type::value );
- typedef typename assert_arg_pred_impl<p>::type type;
- };
- template< typename Pred >
- failed ************ (Pred::************
- assert_arg( void (*)(Pred), typename assert_arg_pred<Pred>::type )
- );
- template< typename Pred >
- failed ************ (boost::mpl::not_<Pred>::************
- assert_not_arg( void (*)(Pred), typename assert_arg_pred_not<Pred>::type )
- );
- template< typename Pred >
- AUX778076_ASSERT_ARG(assert<false>)
- assert_arg( void (*)(Pred), typename assert_arg_pred_not<Pred>::type );
- template< typename Pred >
- AUX778076_ASSERT_ARG(assert<false>)
- assert_not_arg( void (*)(Pred), typename assert_arg_pred<Pred>::type );
-
- 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<true,Pred>
- {
- typedef AUX778076_ASSERT_ARG(assert<false>) 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<Pred>::type
- assert_arg(void (*)(Pred), int);
- template< typename Pred >
- typename assert_arg_type< boost::mpl::not_<Pred> >::type
- assert_not_arg(void (*)(Pred), int);
- 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) );
- template< assert_::relations r, long x, long y >
- typename assert_arg_type_impl< false,assert_relation<r,x,y> >::type
- assert_rel_arg( assert_relation<r,x,y> );
- BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
- 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<false>( \
- boost::mpl::assert_arg( (void (*) pred)0, 1 ) \
- ) \
- ) \
- ) \
- enum { \
- BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
- boost::mpl::assertion<false>::failed( \
- boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \
- ) \
- ) \
- }\
- 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<false>( \
- boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \
- ) \
- ) \
- ) \
- 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_PP_CAT(mpl_assert_rel_value,counter)>( \
- (boost::mpl::failed ************ ( boost::mpl::assert_relation< \
- boost::mpl::assert_::relations( sizeof( \
- boost::mpl::assert_::arg rel boost::mpl::assert_::arg \
- ) ) \
- , x \
- , y \
- >::************)) 0 ) \
- ) \
- ) \
- 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_PP_CAT(mpl_assert_rel_value,counter)>( \
- boost::mpl::assert_rel_arg( boost::mpl::assert_relation< \
- boost::mpl::assert_::relations(BOOST_PP_CAT(mpl_assert_rel,counter)) \
- , x \
- , y \
- >() ) \
- ) \
- ) \
- ) \
- BOOST_MPL_ASSERT_RELATION_IMPL(BOOST_MPL_AUX_PP_COUNTER(), 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))() \
- ) ) \
- ) \
- ) \
- 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 ) \
- ) \
- ) \
- 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() ) \
- ) \
- ) \
- 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() ) \
- ) \
- ) \
- BOOST_MPL_ASSERT_MSG_IMPL( BOOST_MPL_AUX_PP_COUNTER(), c, msg, types_ ) \
|