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