Chris@16: Chris@16: #if !defined(BOOST_PP_IS_ITERATING) Chris@16: Chris@16: ///// header body Chris@16: Chris@16: #ifndef BOOST_MPL_APPLY_FWD_HPP_INCLUDED Chris@16: #define BOOST_MPL_APPLY_FWD_HPP_INCLUDED Chris@16: Chris@16: // Copyright Aleksey Gurtovoy 2000-2004 Chris@16: // Chris@16: // Distributed under the Boost Software License, Version 1.0. Chris@16: // (See accompanying file LICENSE_1_0.txt or copy at Chris@16: // http://www.boost.org/LICENSE_1_0.txt) Chris@16: // Chris@16: // See http://www.boost.org/libs/mpl for documentation. Chris@16: Chris@101: // $Id$ Chris@101: // $Date$ Chris@101: // $Revision$ Chris@16: Chris@16: #if !defined(BOOST_MPL_PREPROCESSING_MODE) Chris@16: # include Chris@16: #endif Chris@16: Chris@16: #include Chris@16: Chris@16: #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ Chris@16: && !defined(BOOST_MPL_PREPROCESSING_MODE) Chris@16: Chris@16: # define BOOST_MPL_PREPROCESSED_HEADER apply_fwd.hpp Chris@16: # include Chris@16: Chris@16: #else Chris@16: Chris@16: # include Chris@16: # include Chris@16: # include Chris@16: # include Chris@16: # include Chris@16: Chris@16: # include Chris@16: # include Chris@16: # include Chris@16: Chris@16: // agurt, 15/jan/02: top-level 'apply' template gives an ICE on MSVC Chris@16: // (for known reasons) Chris@16: #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) Chris@16: # define BOOST_MPL_CFG_NO_APPLY_TEMPLATE Chris@16: #endif Chris@16: Chris@16: namespace boost { namespace mpl { Chris@16: Chris@16: // local macro, #undef-ined at the end of the header Chris@16: # define AUX778076_APPLY_DEF_PARAMS(param, value) \ Chris@16: BOOST_MPL_PP_DEFAULT_PARAMS( \ Chris@16: BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ Chris@16: , param \ Chris@16: , value \ Chris@16: ) \ Chris@16: /**/ Chris@16: Chris@16: # define AUX778076_APPLY_N_COMMA_PARAMS(n, param) \ Chris@16: BOOST_PP_COMMA_IF(n) \ Chris@16: BOOST_MPL_PP_PARAMS(n, param) \ Chris@16: /**/ Chris@16: Chris@16: # if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE) Chris@16: Chris@16: #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) Chris@16: // forward declaration Chris@16: template< Chris@16: typename F, AUX778076_APPLY_DEF_PARAMS(typename T, na) Chris@16: > Chris@16: struct apply; Chris@16: #else Chris@16: namespace aux { Chris@16: template< BOOST_AUX_NTTP_DECL(int, arity_) > struct apply_chooser; Chris@16: } Chris@16: #endif Chris@16: Chris@16: # endif // BOOST_MPL_CFG_NO_APPLY_TEMPLATE Chris@16: Chris@16: #define BOOST_PP_ITERATION_PARAMS_1 \ Chris@16: (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) Chris@16: #include BOOST_PP_ITERATE() Chris@16: Chris@16: Chris@16: # undef AUX778076_APPLY_N_COMMA_PARAMS Chris@16: # undef AUX778076_APPLY_DEF_PARAMS Chris@16: Chris@16: }} Chris@16: Chris@16: #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS Chris@16: #endif // BOOST_MPL_APPLY_FWD_HPP_INCLUDED Chris@16: Chris@16: ///// iteration Chris@16: Chris@16: #else Chris@16: #define i_ BOOST_PP_FRAME_ITERATION(1) Chris@16: Chris@16: template< Chris@16: typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T) Chris@16: > Chris@16: struct BOOST_PP_CAT(apply,i_); Chris@16: Chris@16: #undef i_ Chris@16: #endif // BOOST_PP_IS_ITERATING