2
#ifndef BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED
3
#define BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED
5
// Copyright Aleksey Gurtovoy 2001-2004
7
// Distributed under the Boost Software License, Version 1.0.
8
// (See accompanying file LICENSE_1_0.txt or copy at
9
// http://www.boost.org/LICENSE_1_0.txt)
11
// See http://www.boost.org/libs/mpl for documentation.
13
// $Id: na_spec.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
14
// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
17
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
18
# include <boost/mpl/lambda_fwd.hpp>
19
# include <boost/mpl/int.hpp>
20
# include <boost/mpl/bool.hpp>
21
# include <boost/mpl/aux_/na.hpp>
22
# include <boost/mpl/aux_/arity.hpp>
23
# include <boost/mpl/aux_/template_arity_fwd.hpp>
26
#include <boost/mpl/aux_/preprocessor/params.hpp>
27
#include <boost/mpl/aux_/preprocessor/enum.hpp>
28
#include <boost/mpl/aux_/preprocessor/def_params_tail.hpp>
29
#include <boost/mpl/aux_/lambda_arity_param.hpp>
30
#include <boost/mpl/aux_/config/dtp.hpp>
31
#include <boost/mpl/aux_/config/eti.hpp>
32
#include <boost/mpl/aux_/nttp_decl.hpp>
33
#include <boost/mpl/aux_/config/ttp.hpp>
34
#include <boost/mpl/aux_/config/lambda.hpp>
35
#include <boost/mpl/aux_/config/overload_resolution.hpp>
38
#define BOOST_MPL_AUX_NA_PARAMS(i) \
39
BOOST_MPL_PP_ENUM(i, na) \
42
#if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
43
# define BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \
45
template< BOOST_MPL_AUX_NTTP_DECL(int, N) > \
47
name< BOOST_MPL_AUX_NA_PARAMS(i) > \
50
: int_< BOOST_MPL_LIMIT_METAFUNCTION_ARITY > \
56
# define BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) /**/
59
#define BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \
61
struct name< BOOST_MPL_AUX_NA_PARAMS(i) > \
64
BOOST_MPL_PP_PARAMS(i, typename T) \
65
BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, typename T, na) \
68
: name< BOOST_MPL_PP_PARAMS(i, T) > \
74
#if defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT)
75
# define BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \
78
name< BOOST_MPL_AUX_NA_PARAMS(i) > \
83
typedef false_ is_le; \
84
typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \
88
name< BOOST_MPL_AUX_NA_PARAMS(i) > \
93
typedef false_ is_le; \
94
typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \
98
# define BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \
99
template< typename Tag > \
101
name< BOOST_MPL_AUX_NA_PARAMS(i) > \
103
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_<-1>) \
106
typedef false_ is_le; \
107
typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > result_; \
108
typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \
113
#if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) \
114
|| defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) \
115
&& defined(BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION)
116
# define BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) \
118
template< BOOST_MPL_PP_PARAMS(j, typename T) > \
119
struct template_arity< \
120
name< BOOST_MPL_PP_PARAMS(j, T) > \
127
struct template_arity< \
128
name< BOOST_MPL_PP_ENUM(i, na) > \
136
# define BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) /**/
139
#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
140
# define BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \
142
struct name< BOOST_MPL_PP_ENUM(i, int) > \
145
enum { value = 0 }; \
149
# define BOOST_MPL_AUX_NA_SPEC_ETI(i, name) /**/
152
#define BOOST_MPL_AUX_NA_PARAM(param) param = na
154
#define BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \
155
BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \
156
BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \
157
BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \
158
BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, i, name) \
161
#define BOOST_MPL_AUX_NA_SPEC(i, name) \
162
BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \
163
BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \
166
#define BOOST_MPL_AUX_NA_SPEC2(i, j, name) \
167
BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \
168
BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \
169
BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \
170
BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \
171
BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) \
175
#endif // BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED