]> AND Private Git Repository - canny.git/blob - stc/exp/ml_stc_linux_make_v1.0/include/boost/mpl/aux_/arity_spec.hpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
4853629cd6ec207942d51a7645f335c03d4cc4a4
[canny.git] / stc / exp / ml_stc_linux_make_v1.0 / include / boost / mpl / aux_ / arity_spec.hpp
1 \r
2 #ifndef BOOST_MPL_AUX_ARITY_SPEC_HPP_INCLUDED\r
3 #define BOOST_MPL_AUX_ARITY_SPEC_HPP_INCLUDED\r
4 \r
5 // Copyright Aleksey Gurtovoy 2001-2004\r
6 //\r
7 // Distributed under the Boost Software License, Version 1.0. \r
8 // (See accompanying file LICENSE_1_0.txt or copy at \r
9 // http://www.boost.org/LICENSE_1_0.txt)\r
10 //\r
11 // See http://www.boost.org/libs/mpl for documentation.\r
12 \r
13 // $Id: arity_spec.hpp 49267 2008-10-11 06:19:02Z agurtovoy $\r
14 // $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $\r
15 // $Revision: 49267 $\r
16 \r
17 #include <boost/mpl/int.hpp>\r
18 #include <boost/mpl/limits/arity.hpp>\r
19 #include <boost/mpl/aux_/config/dtp.hpp>\r
20 #include <boost/mpl/aux_/preprocessor/params.hpp>\r
21 #include <boost/mpl/aux_/arity.hpp>\r
22 #include <boost/mpl/aux_/template_arity_fwd.hpp>\r
23 #include <boost/mpl/aux_/config/ttp.hpp>\r
24 #include <boost/mpl/aux_/config/lambda.hpp>\r
25 #include <boost/mpl/aux_/config/static_constant.hpp>\r
26 \r
27 #if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)\r
28 #   define BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(i,type,name) \\r
29 namespace aux { \\r
30 template< BOOST_MPL_AUX_NTTP_DECL(int, N), BOOST_MPL_PP_PARAMS(i,type T) > \\r
31 struct arity< \\r
32       name< BOOST_MPL_PP_PARAMS(i,T) > \\r
33     , N \\r
34     > \\r
35 { \\r
36     BOOST_STATIC_CONSTANT(int \\r
37         , value = BOOST_MPL_LIMIT_METAFUNCTION_ARITY \\r
38         ); \\r
39 }; \\r
40 } \\r
41 /**/\r
42 #else\r
43 #   define BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(i,type,name) /**/\r
44 #endif\r
45 \r
46 #   define BOOST_MPL_AUX_ARITY_SPEC(i,name) \\r
47     BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(i,typename,name) \\r
48 /**/\r
49 \r
50 \r
51 #if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) \\r
52     && !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT)\r
53 #   define BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(i, name) \\r
54 namespace aux { \\r
55 template< BOOST_MPL_PP_PARAMS(i,typename T) > \\r
56 struct template_arity< name<BOOST_MPL_PP_PARAMS(i,T)> > \\r
57     : int_<i> \\r
58 { \\r
59 }; \\r
60 } \\r
61 /**/\r
62 #else\r
63 #   define BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(i, name) /**/\r
64 #endif\r
65 \r
66 \r
67 #endif // BOOST_MPL_AUX_ARITY_SPEC_HPP_INCLUDED\r