Chris@16
|
1
|
Chris@16
|
2 #if !defined(BOOST_PP_IS_ITERATING)
|
Chris@16
|
3
|
Chris@16
|
4 ///// header body
|
Chris@16
|
5
|
Chris@16
|
6 #ifndef BOOST_MPL_APPLY_FWD_HPP_INCLUDED
|
Chris@16
|
7 #define BOOST_MPL_APPLY_FWD_HPP_INCLUDED
|
Chris@16
|
8
|
Chris@16
|
9 // Copyright Aleksey Gurtovoy 2000-2004
|
Chris@16
|
10 //
|
Chris@16
|
11 // Distributed under the Boost Software License, Version 1.0.
|
Chris@16
|
12 // (See accompanying file LICENSE_1_0.txt or copy at
|
Chris@16
|
13 // http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
14 //
|
Chris@16
|
15 // See http://www.boost.org/libs/mpl for documentation.
|
Chris@16
|
16
|
Chris@101
|
17 // $Id$
|
Chris@101
|
18 // $Date$
|
Chris@101
|
19 // $Revision$
|
Chris@16
|
20
|
Chris@16
|
21 #if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
Chris@16
|
22 # include <boost/mpl/aux_/na.hpp>
|
Chris@16
|
23 #endif
|
Chris@16
|
24
|
Chris@16
|
25 #include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
Chris@16
|
26
|
Chris@16
|
27 #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
|
Chris@16
|
28 && !defined(BOOST_MPL_PREPROCESSING_MODE)
|
Chris@16
|
29
|
Chris@16
|
30 # define BOOST_MPL_PREPROCESSED_HEADER apply_fwd.hpp
|
Chris@16
|
31 # include <boost/mpl/aux_/include_preprocessed.hpp>
|
Chris@16
|
32
|
Chris@16
|
33 #else
|
Chris@16
|
34
|
Chris@16
|
35 # include <boost/mpl/limits/arity.hpp>
|
Chris@16
|
36 # include <boost/mpl/aux_/preprocessor/params.hpp>
|
Chris@16
|
37 # include <boost/mpl/aux_/preprocessor/default_params.hpp>
|
Chris@16
|
38 # include <boost/mpl/aux_/config/ctps.hpp>
|
Chris@16
|
39 # include <boost/mpl/aux_/nttp_decl.hpp>
|
Chris@16
|
40
|
Chris@16
|
41 # include <boost/preprocessor/comma_if.hpp>
|
Chris@16
|
42 # include <boost/preprocessor/iterate.hpp>
|
Chris@16
|
43 # include <boost/preprocessor/cat.hpp>
|
Chris@16
|
44
|
Chris@16
|
45 // agurt, 15/jan/02: top-level 'apply' template gives an ICE on MSVC
|
Chris@16
|
46 // (for known reasons)
|
Chris@16
|
47 #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
Chris@16
|
48 # define BOOST_MPL_CFG_NO_APPLY_TEMPLATE
|
Chris@16
|
49 #endif
|
Chris@16
|
50
|
Chris@16
|
51 namespace boost { namespace mpl {
|
Chris@16
|
52
|
Chris@16
|
53 // local macro, #undef-ined at the end of the header
|
Chris@16
|
54 # define AUX778076_APPLY_DEF_PARAMS(param, value) \
|
Chris@16
|
55 BOOST_MPL_PP_DEFAULT_PARAMS( \
|
Chris@16
|
56 BOOST_MPL_LIMIT_METAFUNCTION_ARITY \
|
Chris@16
|
57 , param \
|
Chris@16
|
58 , value \
|
Chris@16
|
59 ) \
|
Chris@16
|
60 /**/
|
Chris@16
|
61
|
Chris@16
|
62 # define AUX778076_APPLY_N_COMMA_PARAMS(n, param) \
|
Chris@16
|
63 BOOST_PP_COMMA_IF(n) \
|
Chris@16
|
64 BOOST_MPL_PP_PARAMS(n, param) \
|
Chris@16
|
65 /**/
|
Chris@16
|
66
|
Chris@16
|
67 # if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE)
|
Chris@16
|
68
|
Chris@16
|
69 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
Chris@16
|
70 // forward declaration
|
Chris@16
|
71 template<
|
Chris@16
|
72 typename F, AUX778076_APPLY_DEF_PARAMS(typename T, na)
|
Chris@16
|
73 >
|
Chris@16
|
74 struct apply;
|
Chris@16
|
75 #else
|
Chris@16
|
76 namespace aux {
|
Chris@16
|
77 template< BOOST_AUX_NTTP_DECL(int, arity_) > struct apply_chooser;
|
Chris@16
|
78 }
|
Chris@16
|
79 #endif
|
Chris@16
|
80
|
Chris@16
|
81 # endif // BOOST_MPL_CFG_NO_APPLY_TEMPLATE
|
Chris@16
|
82
|
Chris@16
|
83 #define BOOST_PP_ITERATION_PARAMS_1 \
|
Chris@16
|
84 (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/apply_fwd.hpp>))
|
Chris@16
|
85 #include BOOST_PP_ITERATE()
|
Chris@16
|
86
|
Chris@16
|
87
|
Chris@16
|
88 # undef AUX778076_APPLY_N_COMMA_PARAMS
|
Chris@16
|
89 # undef AUX778076_APPLY_DEF_PARAMS
|
Chris@16
|
90
|
Chris@16
|
91 }}
|
Chris@16
|
92
|
Chris@16
|
93 #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
Chris@16
|
94 #endif // BOOST_MPL_APPLY_FWD_HPP_INCLUDED
|
Chris@16
|
95
|
Chris@16
|
96 ///// iteration
|
Chris@16
|
97
|
Chris@16
|
98 #else
|
Chris@16
|
99 #define i_ BOOST_PP_FRAME_ITERATION(1)
|
Chris@16
|
100
|
Chris@16
|
101 template<
|
Chris@16
|
102 typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T)
|
Chris@16
|
103 >
|
Chris@16
|
104 struct BOOST_PP_CAT(apply,i_);
|
Chris@16
|
105
|
Chris@16
|
106 #undef i_
|
Chris@16
|
107 #endif // BOOST_PP_IS_ITERATING
|