2 // Copyright Aleksey Gurtovoy 2001-2004
\r
4 // Distributed under the Boost Software License, Version 1.0.
\r
5 // (See accompanying file LICENSE_1_0.txt or copy at
\r
6 // http://www.boost.org/LICENSE_1_0.txt)
\r
9 // Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header
\r
10 // -- DO NOT modify by hand!
\r
12 namespace boost { namespace mpl { namespace aux {
\r
14 template< int N > struct arity_tag
\r
16 typedef char (&type)[N + 1];
\r
20 int C1, int C2, int C3, int C4, int C5, int C6
\r
24 BOOST_STATIC_CONSTANT(int, value =
\r
25 ( C6 > 0 ? C6 : ( C5 > 0 ? C5 : ( C4 > 0 ? C4 : ( C3 > 0 ? C3 : ( C2 > 0 ? C2 : ( C1 > 0 ? C1 : -1 ) ) ) ) ) )
\r
30 arity_tag<0>::type arity_helper(...);
\r
33 template< typename P1 > class F
\r
36 typename arity_tag<1>::type
\r
37 arity_helper(type_wrapper< F<T1> >, arity_tag<1>);
\r
40 template< typename P1, typename P2 > class F
\r
41 , typename T1, typename T2
\r
43 typename arity_tag<2>::type
\r
44 arity_helper(type_wrapper< F< T1,T2 > >, arity_tag<2>);
\r
47 template< typename P1, typename P2, typename P3 > class F
\r
48 , typename T1, typename T2, typename T3
\r
50 typename arity_tag<3>::type
\r
51 arity_helper(type_wrapper< F< T1,T2,T3 > >, arity_tag<3>);
\r
54 template< typename P1, typename P2, typename P3, typename P4 > class F
\r
55 , typename T1, typename T2, typename T3, typename T4
\r
57 typename arity_tag<4>::type
\r
58 arity_helper(type_wrapper< F< T1,T2,T3,T4 > >, arity_tag<4>);
\r
62 typename P1, typename P2, typename P3, typename P4
\r
66 , typename T1, typename T2, typename T3, typename T4, typename T5
\r
68 typename arity_tag<5>::type
\r
69 arity_helper(type_wrapper< F< T1,T2,T3,T4,T5 > >, arity_tag<5>);
\r
73 typename P1, typename P2, typename P3, typename P4
\r
74 , typename P5, typename P6
\r
77 , typename T1, typename T2, typename T3, typename T4, typename T5
\r
80 typename arity_tag<6>::type
\r
81 arity_helper(type_wrapper< F< T1,T2,T3,T4,T5,T6 > >, arity_tag<6>);
\r
82 template< typename F, int N >
\r
83 struct template_arity_impl
\r
85 BOOST_STATIC_CONSTANT(int, value =
\r
86 sizeof(arity_helper(type_wrapper<F>(), arity_tag<N>())) - 1
\r
90 template< typename F >
\r
91 struct template_arity
\r
93 BOOST_STATIC_CONSTANT(int, value = (
\r
94 max_arity< template_arity_impl< F,1 >::value, template_arity_impl< F,2 >::value, template_arity_impl< F,3 >::value, template_arity_impl< F,4 >::value, template_arity_impl< F,5 >::value, template_arity_impl< F,6 >::value >::value
\r
98 typedef mpl::int_<value> type;
\r