File indexing completed on 2025-01-30 09:48:02
0001
0002 #if !defined(BOOST_PP_IS_ITERATING)
0003
0004
0005
0006 #ifndef BOOST_MPL_ARG_HPP_INCLUDED
0007 #define BOOST_MPL_ARG_HPP_INCLUDED
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #if !defined(BOOST_MPL_PREPROCESSING_MODE)
0023 # include <boost/mpl/arg_fwd.hpp>
0024 # include <boost/mpl/aux_/na.hpp>
0025 # include <boost/mpl/aux_/na_assert.hpp>
0026 # include <boost/mpl/aux_/arity_spec.hpp>
0027 # include <boost/mpl/aux_/arg_typedef.hpp>
0028 #endif
0029
0030 #include <boost/mpl/aux_/config/static_constant.hpp>
0031 #include <boost/mpl/aux_/config/use_preprocessed.hpp>
0032
0033 #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
0034 && !defined(BOOST_MPL_PREPROCESSING_MODE)
0035
0036 # define BOOST_MPL_PREPROCESSED_HEADER arg.hpp
0037 # include <boost/mpl/aux_/include_preprocessed.hpp>
0038
0039 #else
0040
0041 # include <boost/mpl/limits/arity.hpp>
0042 # include <boost/mpl/aux_/preprocessor/default_params.hpp>
0043 # include <boost/mpl/aux_/preprocessor/params.hpp>
0044 # include <boost/mpl/aux_/config/lambda.hpp>
0045 # include <boost/mpl/aux_/config/dtp.hpp>
0046 # include <boost/mpl/aux_/nttp_decl.hpp>
0047
0048 # include <boost/preprocessor/iterate.hpp>
0049 # include <boost/preprocessor/inc.hpp>
0050 # include <boost/preprocessor/cat.hpp>
0051
0052 BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
0053
0054
0055 #if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
0056 # define AUX778076_ARG_N_DEFAULT_PARAMS(param,value) \
0057 BOOST_MPL_PP_DEFAULT_PARAMS( \
0058 BOOST_MPL_LIMIT_METAFUNCTION_ARITY \
0059 , param \
0060 , value \
0061 ) \
0062
0063 #else
0064 # define AUX778076_ARG_N_DEFAULT_PARAMS(param,value) \
0065 BOOST_MPL_PP_PARAMS( \
0066 BOOST_MPL_LIMIT_METAFUNCTION_ARITY \
0067 , param \
0068 ) \
0069
0070 #endif
0071
0072 #define BOOST_PP_ITERATION_PARAMS_1 \
0073 (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/arg.hpp>))
0074 #include BOOST_PP_ITERATE()
0075
0076
0077 # undef AUX778076_ARG_N_DEFAULT_PARAMS
0078
0079 BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int,arg)
0080
0081 BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
0082
0083 #endif
0084 #endif
0085
0086
0087
0088 #else
0089 #define i_ BOOST_PP_FRAME_ITERATION(1)
0090
0091 #if i_ > 0
0092
0093 template<> struct arg<i_>
0094 {
0095 BOOST_STATIC_CONSTANT(int, value = i_);
0096 typedef arg<BOOST_PP_INC(i_)> next;
0097 BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
0098 BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
0099
0100 template<
0101 AUX778076_ARG_N_DEFAULT_PARAMS(typename U, na)
0102 >
0103 struct apply
0104 {
0105 typedef BOOST_PP_CAT(U,i_) type;
0106 BOOST_MPL_AUX_ASSERT_NOT_NA(type);
0107 };
0108 };
0109
0110 #else
0111
0112 template<> struct arg<-1>
0113 {
0114 BOOST_STATIC_CONSTANT(int, value = -1);
0115 BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
0116 BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
0117
0118 template<
0119 AUX778076_ARG_N_DEFAULT_PARAMS(typename U, na)
0120 >
0121 struct apply
0122 {
0123 typedef U1 type;
0124 BOOST_MPL_AUX_ASSERT_NOT_NA(type);
0125 };
0126 };
0127
0128 #endif
0129
0130 #undef i_
0131 #endif