2 #if !defined(BOOST_PP_IS_ITERATING) 6 #ifndef BOOST_MPL_AUX_TEMPLATE_ARITY_HPP_INCLUDED 7 #define BOOST_MPL_AUX_TEMPLATE_ARITY_HPP_INCLUDED 24 #if !defined(BOOST_MPL_PREPROCESSING_MODE) 27 # if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) 28 # if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) 32 # include <boost/mpl/aux_/has_rebind.hpp> 39 #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ 40 && !defined(BOOST_MPL_PREPROCESSING_MODE) 42 # define BOOST_MPL_PREPROCESSED_HEADER template_arity.hpp 47 # if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) 48 # if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) 51 # include <boost/mpl/aux_/preprocessor/range.hpp> 52 # include <boost/mpl/aux_/preprocessor/repeat.hpp> 56 # include <boost/preprocessor/seq/fold_left.hpp> 62 # define AUX778076_ARITY BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) 64 namespace boost {
namespace mpl {
namespace aux {
66 template< BOOST_MPL_AUX_NTTP_DECL(
int, N) >
struct arity_tag
68 typedef char (&
type)[N + 1];
71 # define AUX778076_MAX_ARITY_OP(unused, state, i_) \ 72 ( BOOST_PP_CAT(C,i_) > 0 ? BOOST_PP_CAT(C,i_) : state ) \ 81 BOOST_PP_SEQ_FOLD_LEFT(
82 AUX778076_MAX_ARITY_OP
84 , BOOST_MPL_PP_RANGE(1, AUX778076_ARITY)
89 # undef AUX778076_MAX_ARITY_OP 93 # define BOOST_PP_ITERATION_LIMITS (1, AUX778076_ARITY) 94 # define BOOST_PP_FILENAME_1 <boost/mpl/aux_/template_arity.hpp> 95 # include BOOST_PP_ITERATE() 97 template<
typename F, BOOST_MPL_AUX_NTTP_DECL(
int, N) >
98 struct template_arity_impl
105 # define AUX778076_TEMPLATE_ARITY_IMPL_INVOCATION(unused, i_, F) \ 106 BOOST_PP_COMMA_IF(i_) template_arity_impl<F,BOOST_PP_INC(i_)>::value \ 109 template<
typename F >
110 struct template_arity
113 max_arity< BOOST_MPL_PP_REPEAT(
115 , AUX778076_TEMPLATE_ARITY_IMPL_INVOCATION
120 typedef mpl::int_<value>
type;
123 # undef AUX778076_TEMPLATE_ARITY_IMPL_INVOCATION 125 # undef AUX778076_ARITY 129 # endif // BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING 130 # else // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT 134 namespace boost {
namespace mpl {
namespace aux {
137 struct template_arity_impl
139 template<
typename F >
struct result_
146 struct template_arity_impl<true>
148 template<
typename F >
struct result_
154 template<
typename F >
155 struct template_arity
156 : template_arity_impl< ::boost::mpl::aux::has_rebind<F>::value >
157 ::template result_<F>
161 #if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) 163 struct template_arity<int>
171 # endif // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT 173 #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS 174 #endif // BOOST_MPL_AUX_TEMPLATE_ARITY_HPP_INCLUDED 179 #define i_ BOOST_PP_FRAME_ITERATION(1) 182 template< BOOST_MPL_PP_PARAMS(i_,
typename P) >
class F
189 #endif // BOOST_PP_IS_ITERATING
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
#define BOOST_MPL_PP_PARAMS(n, param)
#define BOOST_MPL_AUX_NTTP_DECL(T, x)
arity_tag< 0 >::type arity_helper(...)
#define BOOST_STATIC_CONSTANT(type, assignment)