File indexing completed on 2025-01-18 09:41:37
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include <boost/preprocessor/expr_if.hpp>
0017 #include <boost/preprocessor/inc.hpp>
0018 #include <boost/preprocessor/cat.hpp>
0019
0020 #if !defined(AUX778076_COUNT_ARGS_PARAM_NAME)
0021 # define AUX778076_COUNT_ARGS_PARAM_NAME T
0022 #endif
0023
0024 #if !defined(AUX778076_COUNT_ARGS_TEMPLATE_PARAM)
0025 # define AUX778076_COUNT_ARGS_TEMPLATE_PARAM typename AUX778076_COUNT_ARGS_PARAM_NAME
0026 #endif
0027
0028
0029
0030 #if !defined(AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES)
0031
0032 # include <boost/mpl/aux_/preprocessor/repeat.hpp>
0033 # include <boost/mpl/aux_/preprocessor/params.hpp>
0034
0035 # define AUX778076_COUNT_ARGS_REPEAT BOOST_MPL_PP_REPEAT
0036 # define AUX778076_COUNT_ARGS_PARAMS(param) \
0037 BOOST_MPL_PP_PARAMS( \
0038 AUX778076_COUNT_ARGS_ARITY \
0039 , param \
0040 ) \
0041
0042
0043 #else
0044
0045 # include <boost/preprocessor/enum_shifted_params.hpp>
0046 # include <boost/preprocessor/repeat.hpp>
0047 # include <boost/preprocessor/inc.hpp>
0048
0049 # define AUX778076_COUNT_ARGS_REPEAT BOOST_PP_REPEAT
0050 # define AUX778076_COUNT_ARGS_PARAMS(param) \
0051 BOOST_PP_ENUM_SHIFTED_PARAMS( \
0052 BOOST_PP_INC(AUX778076_COUNT_ARGS_ARITY) \
0053 , param \
0054 ) \
0055
0056
0057 #endif
0058
0059
0060 #define AUX778076_IS_ARG_TEMPLATE_NAME \
0061 BOOST_PP_CAT(is_,BOOST_PP_CAT(AUX778076_COUNT_ARGS_PREFIX,_arg)) \
0062
0063
0064 #define AUX778076_COUNT_ARGS_FUNC(unused, i, param) \
0065 BOOST_PP_EXPR_IF(i, +) \
0066 AUX778076_IS_ARG_TEMPLATE_NAME<BOOST_PP_CAT(param,BOOST_PP_INC(i))>::value \
0067
0068
0069
0070 template< AUX778076_COUNT_ARGS_TEMPLATE_PARAM >
0071 struct AUX778076_IS_ARG_TEMPLATE_NAME
0072 {
0073 BOOST_STATIC_CONSTANT(bool, value = true);
0074 };
0075
0076 template<>
0077 struct AUX778076_IS_ARG_TEMPLATE_NAME<AUX778076_COUNT_ARGS_DEFAULT>
0078 {
0079 BOOST_STATIC_CONSTANT(bool, value = false);
0080 };
0081
0082
0083 template<
0084 AUX778076_COUNT_ARGS_PARAMS(AUX778076_COUNT_ARGS_TEMPLATE_PARAM)
0085 >
0086 struct BOOST_PP_CAT(AUX778076_COUNT_ARGS_PREFIX,_count_args)
0087 {
0088 BOOST_STATIC_CONSTANT(int, value = AUX778076_COUNT_ARGS_REPEAT(
0089 AUX778076_COUNT_ARGS_ARITY
0090 , AUX778076_COUNT_ARGS_FUNC
0091 , AUX778076_COUNT_ARGS_PARAM_NAME
0092 ));
0093 };
0094
0095 #undef AUX778076_COUNT_ARGS_FUNC
0096 #undef AUX778076_IS_ARG_TEMPLATE_NAME
0097 #undef AUX778076_COUNT_ARGS_PARAMS
0098 #undef AUX778076_COUNT_ARGS_REPEAT
0099
0100 #undef AUX778076_COUNT_ARGS_ARITY
0101 #undef AUX778076_COUNT_ARGS_DEFAULT
0102 #undef AUX778076_COUNT_ARGS_PREFIX
0103 #undef AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES
0104 #undef AUX778076_COUNT_ARGS_TEMPLATE_PARAM
0105 #undef AUX778076_COUNT_ARGS_PARAM_NAME