File indexing completed on 2025-01-18 09:41:38
0001
0002 #if !defined(BOOST_PP_IS_ITERATING)
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 #if !defined(BOOST_MPL_PREPROCESSING_MODE)
0021 # include <boost/mpl/numeric_cast.hpp>
0022 # include <boost/mpl/apply_wrap.hpp>
0023 # include <boost/mpl/if.hpp>
0024 # include <boost/mpl/tag.hpp>
0025 # include <boost/mpl/aux_/numeric_cast_utils.hpp>
0026 # include <boost/mpl/aux_/na.hpp>
0027 # include <boost/mpl/aux_/na_spec.hpp>
0028 # include <boost/mpl/aux_/lambda_support.hpp>
0029 # include <boost/mpl/aux_/msvc_eti_base.hpp>
0030 # include <boost/mpl/aux_/value_wknd.hpp>
0031 # include <boost/mpl/aux_/config/eti.hpp>
0032 # include <boost/mpl/aux_/nttp_decl.hpp>
0033 #endif
0034
0035 #include <boost/mpl/aux_/config/static_constant.hpp>
0036
0037 #if defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
0038 || defined(BOOST_MPL_PREPROCESSING_MODE)
0039
0040 # include <boost/mpl/limits/arity.hpp>
0041 # include <boost/mpl/aux_/preprocessor/partial_spec_params.hpp>
0042 # include <boost/mpl/aux_/preprocessor/def_params_tail.hpp>
0043 # include <boost/mpl/aux_/preprocessor/repeat.hpp>
0044 # include <boost/mpl/aux_/preprocessor/ext_params.hpp>
0045 # include <boost/mpl/aux_/preprocessor/params.hpp>
0046 # include <boost/mpl/aux_/preprocessor/enum.hpp>
0047 # include <boost/mpl/aux_/preprocessor/add.hpp>
0048 # include <boost/mpl/aux_/preprocessor/sub.hpp>
0049 # include <boost/mpl/aux_/config/ctps.hpp>
0050 # include <boost/mpl/aux_/config/eti.hpp>
0051 # include <boost/mpl/aux_/config/msvc.hpp>
0052 # include <boost/mpl/aux_/config/workaround.hpp>
0053
0054 # include <boost/preprocessor/dec.hpp>
0055 # include <boost/preprocessor/inc.hpp>
0056 # include <boost/preprocessor/iterate.hpp>
0057 # include <boost/preprocessor/cat.hpp>
0058
0059
0060 #if !defined(AUX778076_OP_ARITY)
0061 # define AUX778076_OP_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY
0062 #endif
0063
0064 #if !defined(AUX778076_OP_IMPL_NAME)
0065 # define AUX778076_OP_IMPL_NAME BOOST_PP_CAT(AUX778076_OP_PREFIX,_impl)
0066 #endif
0067
0068 #if !defined(AUX778076_OP_TAG_NAME)
0069 # define AUX778076_OP_TAG_NAME BOOST_PP_CAT(AUX778076_OP_PREFIX,_tag)
0070 #endif
0071
0072 namespace boost { namespace mpl {
0073
0074 template<
0075 typename Tag1
0076 , typename Tag2
0077 #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
0078 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
0079 , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
0080 >
0081 struct AUX778076_OP_IMPL_NAME
0082 : if_c<
0083 ( tag1_ > tag2_ )
0084 #else
0085 >
0086 struct AUX778076_OP_IMPL_NAME
0087 : if_c<
0088 ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
0089 > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
0090 )
0091 #endif
0092 , aux::cast2nd_impl< AUX778076_OP_IMPL_NAME<Tag1,Tag1>,Tag1,Tag2 >
0093 , aux::cast1st_impl< AUX778076_OP_IMPL_NAME<Tag2,Tag2>,Tag1,Tag2 >
0094 >::type
0095 {
0096 };
0097
0098
0099 template<> struct AUX778076_OP_IMPL_NAME<na,na>
0100 {
0101 template< typename U1, typename U2 > struct apply
0102 {
0103 typedef apply type;
0104 BOOST_STATIC_CONSTANT(int, value = 0);
0105 };
0106 };
0107
0108 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
0109 template< typename Tag > struct AUX778076_OP_IMPL_NAME<na,Tag>
0110 {
0111 template< typename U1, typename U2 > struct apply
0112 {
0113 typedef apply type;
0114 BOOST_STATIC_CONSTANT(int, value = 0);
0115 };
0116 };
0117
0118 template< typename Tag > struct AUX778076_OP_IMPL_NAME<Tag,na>
0119 {
0120 template< typename U1, typename U2 > struct apply
0121 {
0122 typedef apply type;
0123 BOOST_STATIC_CONSTANT(int, value = 0);
0124 };
0125 };
0126 #else
0127 template<> struct AUX778076_OP_IMPL_NAME<na,integral_c_tag>
0128 {
0129 template< typename U1, typename U2 > struct apply
0130 {
0131 typedef apply type;
0132 BOOST_STATIC_CONSTANT(int, value = 0);
0133 };
0134 };
0135
0136 template<> struct AUX778076_OP_IMPL_NAME<integral_c_tag,na>
0137 {
0138 template< typename U1, typename U2 > struct apply
0139 {
0140 typedef apply type;
0141 BOOST_STATIC_CONSTANT(int, value = 0);
0142 };
0143 };
0144 #endif
0145
0146
0147 #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
0148 && BOOST_WORKAROUND(BOOST_MSVC, >= 1300)
0149 template< typename T > struct AUX778076_OP_TAG_NAME
0150 : tag<T,na>
0151 {
0152 };
0153 #else
0154 template< typename T > struct AUX778076_OP_TAG_NAME
0155 {
0156 typedef typename T::tag type;
0157 };
0158 #endif
0159
0160
0161 #if AUX778076_OP_ARITY != 2
0162
0163 # if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
0164
0165 # define AUX778076_OP_RIGHT_OPERAND(unused, i, N) , BOOST_PP_CAT(N, BOOST_MPL_PP_ADD(i, 2))>
0166 # define AUX778076_OP_N_CALLS(i, N) \
0167 BOOST_MPL_PP_REPEAT( BOOST_PP_DEC(i), BOOST_MPL_PP_REPEAT_IDENTITY_FUNC, AUX778076_OP_NAME< ) \
0168 N1 BOOST_MPL_PP_REPEAT( BOOST_MPL_PP_SUB(i, 1), AUX778076_OP_RIGHT_OPERAND, N ) \
0169
0170
0171 template<
0172 typename BOOST_MPL_AUX_NA_PARAM(N1)
0173 , typename BOOST_MPL_AUX_NA_PARAM(N2)
0174 BOOST_MPL_PP_DEF_PARAMS_TAIL(2, typename N, na)
0175 >
0176 struct AUX778076_OP_NAME
0177 : AUX778076_OP_N_CALLS(AUX778076_OP_ARITY, N)
0178 {
0179 BOOST_MPL_AUX_LAMBDA_SUPPORT(
0180 AUX778076_OP_ARITY
0181 , AUX778076_OP_NAME
0182 , ( BOOST_MPL_PP_PARAMS(AUX778076_OP_ARITY, N) )
0183 )
0184 };
0185
0186 #define BOOST_PP_ITERATION_PARAMS_1 \
0187 (3,( BOOST_PP_DEC(AUX778076_OP_ARITY), 2, <boost/mpl/aux_/numeric_op.hpp> ))
0188 #include BOOST_PP_ITERATE()
0189
0190 # undef AUX778076_OP_N_CALLS
0191 # undef AUX778076_OP_RIGHT_OPERAND
0192
0193 # else
0194
0195
0196 template<
0197 typename BOOST_MPL_AUX_NA_PARAM(N1)
0198 , typename BOOST_MPL_AUX_NA_PARAM(N2)
0199 >
0200 struct BOOST_PP_CAT(AUX778076_OP_NAME,2);
0201
0202 template<
0203 typename BOOST_MPL_AUX_NA_PARAM(N1)
0204 , typename BOOST_MPL_AUX_NA_PARAM(N2)
0205 BOOST_MPL_PP_DEF_PARAMS_TAIL(2, typename N, na)
0206 >
0207 struct AUX778076_OP_NAME
0208 #if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
0209 : aux::msvc_eti_base< typename if_<
0210 #else
0211 : if_<
0212 #endif
0213 is_na<N3>
0214 , BOOST_PP_CAT(AUX778076_OP_NAME,2)<N1,N2>
0215 , AUX778076_OP_NAME<
0216 BOOST_PP_CAT(AUX778076_OP_NAME,2)<N1,N2>
0217 , BOOST_MPL_PP_EXT_PARAMS(3, BOOST_PP_INC(AUX778076_OP_ARITY), N)
0218 >
0219 >::type
0220 #if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
0221 >
0222 #endif
0223 {
0224 BOOST_MPL_AUX_LAMBDA_SUPPORT(
0225 AUX778076_OP_ARITY
0226 , AUX778076_OP_NAME
0227 , ( BOOST_MPL_PP_PARAMS(AUX778076_OP_ARITY, N) )
0228 )
0229 };
0230
0231 template<
0232 typename N1
0233 , typename N2
0234 >
0235 struct BOOST_PP_CAT(AUX778076_OP_NAME,2)
0236
0237 #endif
0238
0239 #else
0240
0241 template<
0242 typename BOOST_MPL_AUX_NA_PARAM(N1)
0243 , typename BOOST_MPL_AUX_NA_PARAM(N2)
0244 >
0245 struct AUX778076_OP_NAME
0246
0247 #endif
0248
0249 #if !defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
0250 : AUX778076_OP_IMPL_NAME<
0251 typename AUX778076_OP_TAG_NAME<N1>::type
0252 , typename AUX778076_OP_TAG_NAME<N2>::type
0253 >::template apply<N1,N2>::type
0254 #else
0255 : aux::msvc_eti_base< typename apply_wrap2<
0256 AUX778076_OP_IMPL_NAME<
0257 typename AUX778076_OP_TAG_NAME<N1>::type
0258 , typename AUX778076_OP_TAG_NAME<N2>::type
0259 >
0260 , N1
0261 , N2
0262 >::type >::type
0263 #endif
0264 {
0265 #if AUX778076_OP_ARITY != 2
0266
0267 # if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
0268 BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
0269 AUX778076_OP_ARITY
0270 , AUX778076_OP_NAME
0271 , ( BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(2, N, na) )
0272 )
0273 # else
0274 BOOST_MPL_AUX_LAMBDA_SUPPORT(2, BOOST_PP_CAT(AUX778076_OP_NAME,2), (N1, N2))
0275 # endif
0276
0277 #else
0278 BOOST_MPL_AUX_LAMBDA_SUPPORT(2, AUX778076_OP_NAME, (N1, N2))
0279 #endif
0280 };
0281
0282 BOOST_MPL_AUX_NA_SPEC2(2, AUX778076_OP_ARITY, AUX778076_OP_NAME)
0283
0284 }}
0285
0286 #endif
0287
0288
0289
0290
0291
0292 #else
0293 #if BOOST_PP_ITERATION_DEPTH() == 1
0294
0295 # define i_ BOOST_PP_FRAME_ITERATION(1)
0296
0297 template<
0298 BOOST_MPL_PP_PARAMS(i_, typename N)
0299 >
0300 struct AUX778076_OP_NAME<BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(i_, N, na)>
0301 #if i_ != 2
0302 : AUX778076_OP_N_CALLS(i_, N)
0303 {
0304 BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
0305 AUX778076_OP_ARITY
0306 , AUX778076_OP_NAME
0307 , ( BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(i_, N, na) )
0308 )
0309 };
0310 #endif
0311
0312 # undef i_
0313
0314 #endif
0315 #endif