Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:41:38

0001 
0002 // Copyright Aleksey Gurtovoy 2000-2004
0003 //
0004 // Distributed under the Boost Software License, Version 1.0. 
0005 // (See accompanying file LICENSE_1_0.txt or copy at 
0006 // http://www.boost.org/LICENSE_1_0.txt)
0007 //
0008 // See http://www.boost.org/libs/mpl for documentation.
0009 
0010 // $Id$
0011 // $Date$
0012 // $Revision$
0013 
0014 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION!
0015 
0016 #if !defined(BOOST_MPL_PREPROCESSING_MODE)
0017 #   include <boost/mpl/bool.hpp>
0018 #   include <boost/mpl/aux_/nested_type_wknd.hpp>
0019 #   include <boost/mpl/aux_/na_spec.hpp>
0020 #   include <boost/mpl/aux_/lambda_support.hpp>
0021 #endif
0022 
0023 #include <boost/mpl/limits/arity.hpp>
0024 #include <boost/mpl/aux_/preprocessor/params.hpp>
0025 #include <boost/mpl/aux_/preprocessor/ext_params.hpp>
0026 #include <boost/mpl/aux_/preprocessor/def_params_tail.hpp>
0027 #include <boost/mpl/aux_/preprocessor/enum.hpp>
0028 #include <boost/mpl/aux_/preprocessor/sub.hpp>
0029 #include <boost/mpl/aux_/config/ctps.hpp>
0030 #include <boost/mpl/aux_/config/workaround.hpp>
0031 
0032 #include <boost/preprocessor/dec.hpp>
0033 #include <boost/preprocessor/inc.hpp>
0034 #include <boost/preprocessor/cat.hpp>
0035 
0036 namespace boost { namespace mpl {
0037 
0038 #   define AUX778076_PARAMS(param, sub) \
0039     BOOST_MPL_PP_PARAMS( \
0040           BOOST_MPL_PP_SUB(BOOST_MPL_LIMIT_METAFUNCTION_ARITY, sub) \
0041         , param \
0042         ) \
0043     /**/
0044 
0045 #   define AUX778076_SHIFTED_PARAMS(param, sub) \
0046     BOOST_MPL_PP_EXT_PARAMS( \
0047           2, BOOST_MPL_PP_SUB(BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY), sub) \
0048         , param \
0049         ) \
0050     /**/
0051 
0052 #   define AUX778076_SPEC_PARAMS(param) \
0053     BOOST_MPL_PP_ENUM( \
0054           BOOST_PP_DEC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) \
0055         , param \
0056         ) \
0057     /**/
0058 
0059 namespace aux {
0060 
0061 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
0062 
0063 template< bool C_, AUX778076_PARAMS(typename T, 1) >
0064 struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)
0065     : BOOST_PP_CAT(AUX778076_OP_VALUE1,_)
0066 {
0067 };
0068 
0069 template< AUX778076_PARAMS(typename T, 1) >
0070 struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)< AUX778076_OP_VALUE2,AUX778076_PARAMS(T, 1) >
0071     : BOOST_PP_CAT(AUX778076_OP_NAME,impl)<
0072           BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
0073         , AUX778076_SHIFTED_PARAMS(T, 1)
0074         , BOOST_PP_CAT(AUX778076_OP_VALUE2,_)
0075         >
0076 {
0077 };
0078 
0079 template<>
0080 struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)<
0081           AUX778076_OP_VALUE2
0082         , AUX778076_SPEC_PARAMS(BOOST_PP_CAT(AUX778076_OP_VALUE2,_))
0083         >
0084     : BOOST_PP_CAT(AUX778076_OP_VALUE2,_)
0085 {
0086 };
0087 
0088 #else
0089 
0090 template< bool C_ > struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)
0091 {
0092     template< AUX778076_PARAMS(typename T, 1) > struct result_
0093         : BOOST_PP_CAT(AUX778076_OP_VALUE1,_)
0094     {
0095     };
0096 };
0097 
0098 template<> struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)<AUX778076_OP_VALUE2>
0099 {
0100     template< AUX778076_PARAMS(typename T, 1) > struct result_
0101         : BOOST_PP_CAT(AUX778076_OP_NAME,impl)< 
0102               BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
0103             >::template result_< AUX778076_SHIFTED_PARAMS(T,1),BOOST_PP_CAT(AUX778076_OP_VALUE2,_) >
0104     {
0105     };
0106 
0107 #if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
0108     template<> struct result_<AUX778076_SPEC_PARAMS(BOOST_PP_CAT(AUX778076_OP_VALUE2,_))>
0109         : BOOST_PP_CAT(AUX778076_OP_VALUE2,_)
0110     {
0111     };
0112 };
0113 #else
0114 };
0115 
0116 template<>
0117 struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)<AUX778076_OP_VALUE2>
0118     ::result_< AUX778076_SPEC_PARAMS(BOOST_PP_CAT(AUX778076_OP_VALUE2,_)) >
0119         : BOOST_PP_CAT(AUX778076_OP_VALUE2,_)
0120 {
0121 };
0122 #endif // BOOST_MSVC == 1300
0123 
0124 #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
0125 
0126 } // namespace aux
0127 
0128 template<
0129       typename BOOST_MPL_AUX_NA_PARAM(T1)
0130     , typename BOOST_MPL_AUX_NA_PARAM(T2)
0131     BOOST_MPL_PP_DEF_PARAMS_TAIL(2, typename T, BOOST_PP_CAT(AUX778076_OP_VALUE2,_))
0132     >
0133 struct AUX778076_OP_NAME
0134 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
0135     : aux::BOOST_PP_CAT(AUX778076_OP_NAME,impl)<
0136           BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
0137         , AUX778076_SHIFTED_PARAMS(T,0)
0138         >
0139 #else
0140     : aux::BOOST_PP_CAT(AUX778076_OP_NAME,impl)< 
0141           BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
0142         >::template result_< AUX778076_SHIFTED_PARAMS(T,0) >
0143 #endif
0144 {
0145     BOOST_MPL_AUX_LAMBDA_SUPPORT(
0146           BOOST_MPL_LIMIT_METAFUNCTION_ARITY
0147         , AUX778076_OP_NAME
0148         , (AUX778076_PARAMS(T, 0))
0149         )
0150 };
0151 
0152 BOOST_MPL_AUX_NA_SPEC2(
0153       2
0154     , BOOST_MPL_LIMIT_METAFUNCTION_ARITY
0155     , AUX778076_OP_NAME
0156     )
0157 
0158 }}
0159 
0160 #undef AUX778076_SPEC_PARAMS
0161 #undef AUX778076_SHIFTED_PARAMS
0162 #undef AUX778076_PARAMS
0163 #undef AUX778076_OP_NAME
0164 #undef AUX778076_OP_VALUE1
0165 #undef AUX778076_OP_VALUE2