diff -r 000000000000 -r e4d67989cc36 ossrv_pub/boost_apis/boost/mpl/aux_/numeric_op.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ossrv_pub/boost_apis/boost/mpl/aux_/numeric_op.hpp Tue Feb 02 02:01:42 2010 +0200 @@ -0,0 +1,311 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/aux_/numeric_op.hpp,v $ +// $Date: 2005/08/25 16:27:21 $ +// $Revision: 1.10 $ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +#endif + +#include + +#if defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + || defined(BOOST_MPL_PREPROCESSING_MODE) + +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include + +# include +# include +# include +# include + + +#if !defined(AUX778076_OP_ARITY) +# define AUX778076_OP_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY +#endif + +#if !defined(AUX778076_OP_IMPL_NAME) +# define AUX778076_OP_IMPL_NAME BOOST_PP_CAT(AUX778076_OP_PREFIX,_impl) +#endif + +#if !defined(AUX778076_OP_TAG_NAME) +# define AUX778076_OP_TAG_NAME BOOST_PP_CAT(AUX778076_OP_PREFIX,_tag) +#endif + +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value + , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value + > +struct AUX778076_OP_IMPL_NAME + : if_c< + ( tag1_ > tag2_ ) +#else + > +struct AUX778076_OP_IMPL_NAME + : if_c< + ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) + > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) + ) +#endif + , aux::cast2nd_impl< AUX778076_OP_IMPL_NAME,Tag1,Tag2 > + , aux::cast1st_impl< AUX778076_OP_IMPL_NAME,Tag1,Tag2 > + >::type +{ +}; + +/// for Digital Mars C++/compilers with no CTPS/TTP support +template<> struct AUX778076_OP_IMPL_NAME +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +template< typename Tag > struct AUX778076_OP_IMPL_NAME +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template< typename Tag > struct AUX778076_OP_IMPL_NAME +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; +#else +template<> struct AUX778076_OP_IMPL_NAME +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; + +template<> struct AUX778076_OP_IMPL_NAME +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + BOOST_STATIC_CONSTANT(int, value = 0); + }; +}; +#endif + + +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && BOOST_WORKAROUND(BOOST_MSVC, >= 1300) +template< typename T > struct AUX778076_OP_TAG_NAME + : tag +{ +}; +#else +template< typename T > struct AUX778076_OP_TAG_NAME +{ + typedef typename T::tag type; +}; +#endif + + +#if AUX778076_OP_ARITY != 2 + +# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +# define AUX778076_OP_RIGHT_OPERAND(unused, i, N) , BOOST_PP_CAT(N, BOOST_MPL_PP_ADD(i, 2))> +# define AUX778076_OP_N_CALLS(i, N) \ + BOOST_MPL_PP_REPEAT( BOOST_PP_DEC(i), BOOST_MPL_PP_REPEAT_IDENTITY_FUNC, AUX778076_OP_NAME< ) \ + N1 BOOST_MPL_PP_REPEAT( BOOST_MPL_PP_SUB(i, 1), AUX778076_OP_RIGHT_OPERAND, N ) \ +/**/ + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + BOOST_MPL_PP_DEF_PARAMS_TAIL(2, typename N, na) + > +struct AUX778076_OP_NAME + : AUX778076_OP_N_CALLS(AUX778076_OP_ARITY, N) +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + AUX778076_OP_ARITY + , AUX778076_OP_NAME + , ( BOOST_MPL_PP_PARAMS(AUX778076_OP_ARITY, N) ) + ) +}; + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,( BOOST_PP_DEC(AUX778076_OP_ARITY), 2, )) +#include BOOST_PP_ITERATE() + +# undef AUX778076_OP_N_CALLS +# undef AUX778076_OP_RIGHT_OPERAND + +# else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +/// forward declaration +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct BOOST_PP_CAT(AUX778076_OP_NAME,2); + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + BOOST_MPL_PP_DEF_PARAMS_TAIL(2, typename N, na) + > +struct AUX778076_OP_NAME +#if BOOST_WORKAROUND(BOOST_MSVC, == 1300) + : aux::msvc_eti_base< typename if_< +#else + : if_< +#endif + is_na + , BOOST_PP_CAT(AUX778076_OP_NAME,2) + , AUX778076_OP_NAME< + BOOST_PP_CAT(AUX778076_OP_NAME,2) + , BOOST_MPL_PP_EXT_PARAMS(3, BOOST_PP_INC(AUX778076_OP_ARITY), N) + > + >::type +#if BOOST_WORKAROUND(BOOST_MSVC, == 1300) + > +#endif +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT( + AUX778076_OP_ARITY + , AUX778076_OP_NAME + , ( BOOST_MPL_PP_PARAMS(AUX778076_OP_ARITY, N) ) + ) +}; + +template< + typename N1 + , typename N2 + > +struct BOOST_PP_CAT(AUX778076_OP_NAME,2) + +#endif + +#else // AUX778076_OP_ARITY == 2 + +template< + typename BOOST_MPL_AUX_NA_PARAM(N1) + , typename BOOST_MPL_AUX_NA_PARAM(N2) + > +struct AUX778076_OP_NAME + +#endif + +#if !defined(BOOST_MPL_CFG_MSVC_ETI_BUG) + : AUX778076_OP_IMPL_NAME< + typename AUX778076_OP_TAG_NAME::type + , typename AUX778076_OP_TAG_NAME::type + >::template apply::type +#else + : aux::msvc_eti_base< typename apply_wrap2< + AUX778076_OP_IMPL_NAME< + typename AUX778076_OP_TAG_NAME::type + , typename AUX778076_OP_TAG_NAME::type + > + , N1 + , N2 + >::type >::type +#endif +{ +#if AUX778076_OP_ARITY != 2 + +# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + AUX778076_OP_ARITY + , AUX778076_OP_NAME + , ( BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(2, N, na) ) + ) +# else + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, BOOST_PP_CAT(AUX778076_OP_NAME,2), (N1, N2)) +# endif + +#else + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, AUX778076_OP_NAME, (N1, N2)) +#endif +}; + +BOOST_MPL_AUX_NA_SPEC2(2, AUX778076_OP_ARITY, AUX778076_OP_NAME) + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +///// iteration, depth == 1 + +#elif BOOST_PP_ITERATION_DEPTH() == 1 + +# define i_ BOOST_PP_FRAME_ITERATION(1) + +template< + BOOST_MPL_PP_PARAMS(i_, typename N) + > +struct AUX778076_OP_NAME +#if i_ != 2 + : AUX778076_OP_N_CALLS(i_, N) +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( + AUX778076_OP_ARITY + , AUX778076_OP_NAME + , ( BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(i_, N, na) ) + ) +}; +#endif + +# undef i_ + +#endif // BOOST_PP_IS_ITERATING