2 #ifndef BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED
\r
3 #define BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED
\r
5 // Copyright Aleksey Gurtovoy 2001-2004
\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
11 // See http://www.boost.org/libs/mpl for documentation.
\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
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
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
38 #define BOOST_MPL_AUX_NA_PARAMS(i) \
\r
39 BOOST_MPL_PP_ENUM(i, na) \
\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
45 template< BOOST_MPL_AUX_NTTP_DECL(int, N) > \
\r
47 name< BOOST_MPL_AUX_NA_PARAMS(i) > \
\r
50 : int_< BOOST_MPL_LIMIT_METAFUNCTION_ARITY > \
\r
56 # define BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) /**/
\r
59 #define BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \
\r
61 struct name< BOOST_MPL_AUX_NA_PARAMS(i) > \
\r
64 BOOST_MPL_PP_PARAMS(i, typename T) \
\r
65 BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, typename T, na) \
\r
68 : name< BOOST_MPL_PP_PARAMS(i, T) > \
\r
74 #if defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT)
\r
75 # define BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \
\r
78 name< BOOST_MPL_AUX_NA_PARAMS(i) > \
\r
83 typedef false_ is_le; \
\r
84 typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \
\r
88 name< BOOST_MPL_AUX_NA_PARAMS(i) > \
\r
93 typedef false_ is_le; \
\r
94 typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \
\r
98 # define BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \
\r
99 template< typename Tag > \
\r
101 name< BOOST_MPL_AUX_NA_PARAMS(i) > \
\r
103 BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_<-1>) \
\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
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
118 template< BOOST_MPL_PP_PARAMS(j, typename T) > \
\r
119 struct template_arity< \
\r
120 name< BOOST_MPL_PP_PARAMS(j, T) > \
\r
127 struct template_arity< \
\r
128 name< BOOST_MPL_PP_ENUM(i, na) > \
\r
136 # define BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) /**/
\r
139 #if defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
\r
140 # define BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \
\r
142 struct name< BOOST_MPL_PP_ENUM(i, int) > \
\r
144 typedef int type; \
\r
145 enum { value = 0 }; \
\r
149 # define BOOST_MPL_AUX_NA_SPEC_ETI(i, name) /**/
\r
152 #define BOOST_MPL_AUX_NA_PARAM(param) param = na
\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
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
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
175 #endif // BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED
\r