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

Private GIT Repository
a3387b765d5ca194cbd0e7350275e31600e4c63c
[canny.git] / stc / exp / ml_stc_linux_make_v1.0 / include / boost / mpl / aux_ / na_spec.hpp
1 \r
2 #ifndef BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED\r
3 #define BOOST_MPL_AUX_NA_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: na_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 #if !defined(BOOST_MPL_PREPROCESSING_MODE)\r
18 #   include <boost/mpl/lambda_fwd.hpp>\r
19 #   include <boost/mpl/int.hpp>\r
20 #   include <boost/mpl/bool.hpp>\r
21 #   include <boost/mpl/aux_/na.hpp>\r
22 #   include <boost/mpl/aux_/arity.hpp>\r
23 #   include <boost/mpl/aux_/template_arity_fwd.hpp>\r
24 #endif\r
25 \r
26 #include <boost/mpl/aux_/preprocessor/params.hpp>\r
27 #include <boost/mpl/aux_/preprocessor/enum.hpp>\r
28 #include <boost/mpl/aux_/preprocessor/def_params_tail.hpp>\r
29 #include <boost/mpl/aux_/lambda_arity_param.hpp>\r
30 #include <boost/mpl/aux_/config/dtp.hpp>\r
31 #include <boost/mpl/aux_/config/eti.hpp>\r
32 #include <boost/mpl/aux_/nttp_decl.hpp>\r
33 #include <boost/mpl/aux_/config/ttp.hpp>\r
34 #include <boost/mpl/aux_/config/lambda.hpp>\r
35 #include <boost/mpl/aux_/config/overload_resolution.hpp>\r
36 \r
37 \r
38 #define BOOST_MPL_AUX_NA_PARAMS(i) \\r
39     BOOST_MPL_PP_ENUM(i, na) \\r
40 /**/\r
41 \r
42 #if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)\r
43 #   define BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \\r
44 namespace aux { \\r
45 template< BOOST_MPL_AUX_NTTP_DECL(int, N) > \\r
46 struct arity< \\r
47           name< BOOST_MPL_AUX_NA_PARAMS(i) > \\r
48         , N \\r
49         > \\r
50     : int_< BOOST_MPL_LIMIT_METAFUNCTION_ARITY > \\r
51 { \\r
52 }; \\r
53 } \\r
54 /**/\r
55 #else\r
56 #   define BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) /**/\r
57 #endif\r
58 \r
59 #define BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \\r
60 template<> \\r
61 struct name< BOOST_MPL_AUX_NA_PARAMS(i) > \\r
62 { \\r
63     template< \\r
64           BOOST_MPL_PP_PARAMS(i, typename T) \\r
65         BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, typename T, na) \\r
66         > \\r
67     struct apply \\r
68         : name< BOOST_MPL_PP_PARAMS(i, T) > \\r
69     { \\r
70     }; \\r
71 }; \\r
72 /**/\r
73 \r
74 #if defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT)\r
75 #   define BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \\r
76 template<> \\r
77 struct lambda< \\r
78       name< BOOST_MPL_AUX_NA_PARAMS(i) > \\r
79     , void_ \\r
80     , true_ \\r
81     > \\r
82 { \\r
83     typedef false_ is_le; \\r
84     typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \\r
85 }; \\r
86 template<> \\r
87 struct lambda< \\r
88       name< BOOST_MPL_AUX_NA_PARAMS(i) > \\r
89     , void_ \\r
90     , false_ \\r
91     > \\r
92 { \\r
93     typedef false_ is_le; \\r
94     typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \\r
95 }; \\r
96 /**/\r
97 #else\r
98 #   define BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \\r
99 template< typename Tag > \\r
100 struct lambda< \\r
101       name< BOOST_MPL_AUX_NA_PARAMS(i) > \\r
102     , Tag \\r
103     BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_<-1>) \\r
104     > \\r
105 { \\r
106     typedef false_ is_le; \\r
107     typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > result_; \\r
108     typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \\r
109 }; \\r
110 /**/\r
111 #endif\r
112 \r
113 #if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) \\r
114     || defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) \\r
115         && defined(BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION)\r
116 #   define BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) \\r
117 namespace aux { \\r
118 template< BOOST_MPL_PP_PARAMS(j, typename T) > \\r
119 struct template_arity< \\r
120           name< BOOST_MPL_PP_PARAMS(j, T) > \\r
121         > \\r
122     : int_<j> \\r
123 { \\r
124 }; \\r
125 \\r
126 template<> \\r
127 struct template_arity< \\r
128           name< BOOST_MPL_PP_ENUM(i, na) > \\r
129         > \\r
130     : int_<-1> \\r
131 { \\r
132 }; \\r
133 } \\r
134 /**/\r
135 #else\r
136 #   define BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) /**/\r
137 #endif\r
138 \r
139 #if defined(BOOST_MPL_CFG_MSVC_ETI_BUG)\r
140 #   define BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \\r
141 template<> \\r
142 struct name< BOOST_MPL_PP_ENUM(i, int) > \\r
143 { \\r
144     typedef int type; \\r
145     enum { value = 0 }; \\r
146 }; \\r
147 /**/\r
148 #else\r
149 #   define BOOST_MPL_AUX_NA_SPEC_ETI(i, name) /**/\r
150 #endif\r
151 \r
152 #define BOOST_MPL_AUX_NA_PARAM(param) param = na\r
153 \r
154 #define BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \\r
155 BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \\r
156 BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \\r
157 BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \\r
158 BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, i, name) \\r
159 /**/\r
160 \r
161 #define BOOST_MPL_AUX_NA_SPEC(i, name) \\r
162 BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \\r
163 BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \\r
164 /**/\r
165 \r
166 #define BOOST_MPL_AUX_NA_SPEC2(i, j, name) \\r
167 BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \\r
168 BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \\r
169 BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \\r
170 BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \\r
171 BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) \\r
172 /**/\r
173 \r
174 \r
175 #endif // BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED\r