1 2 #if !defined(BOOST_PP_IS_ITERATING) 3 4 ///// header body 5 6 #ifndef BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED 7 #define BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED 8 9 // Copyright Aleksey Gurtovoy 2001-2004 10 // Copyright Peter Dimov 2001-2003 11 // 12 // Distributed under the Boost Software License, Version 1.0. 13 // (See accompanying file LICENSE_1_0.txt or copy at 14 // http://www.boost.org/LICENSE_1_0.txt) 15 // 16 // See http://www.boost.org/libs/mpl for documentation. 17 18 // $Id$ 19 // $Date$ 20 // $Revision$ 21 22 23 #if !defined(BOOST_MPL_PREPROCESSING_MODE) 24 # include <boost/mpl/arg.hpp> 25 # include <boost/mpl/aux_/adl_barrier.hpp> 26 27 # if !defined(BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE) 28 # define BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(type) \ 29 using ::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::type; \ 30 /**/ 31 # else 32 # define BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(type) /**/ 33 # endif 34 35 #endif 36 37 #include <boost/mpl/aux_/config/use_preprocessed.hpp> 38 39 #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ 40 && !defined(BOOST_MPL_PREPROCESSING_MODE) 41 42 # define BOOST_MPL_PREPROCESSED_HEADER placeholders.hpp 43 # include <boost/mpl/aux_/include_preprocessed.hpp> 44 45 #else 46 47 # include <boost/mpl/aux_/nttp_decl.hpp> 48 # include <boost/mpl/limits/arity.hpp> 49 # include <boost/preprocessor/iterate.hpp> 50 # include <boost/preprocessor/cat.hpp> 51 52 // watch out for GNU gettext users, who #define _(x) 53 #if !defined(_) || defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) 54 BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN 55 typedef arg<-1> _; 56 BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE 57 58 namespace boost { namespace mpl { 59 60 BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) 61 62 namespace placeholders { 63 using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; 64 } 65 66 }} 67 #endif 68 69 /// agurt, 17/mar/02: one more placeholder for the last 'apply#' 70 /// specialization 71 #define BOOST_PP_ITERATION_PARAMS_1 \ 72 (3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY + 1, <boost/mpl/placeholders.hpp>)) 73 #include BOOST_PP_ITERATE() 74 75 #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS 76 #endif // BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED 77 78 ///// iteration 79 80 #else 81 #define i_ BOOST_PP_FRAME_ITERATION(1) 82 83 BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN 84 85 typedef arg<i_> BOOST_PP_CAT(_,i_); 86 87 BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE 88 89 namespace boost { namespace mpl { 90 91 BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(BOOST_PP_CAT(_,i_)) 92 93 namespace placeholders { 94 using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::BOOST_PP_CAT(_,i_); 95 } 96 97 }} 98 99 #undef i_ 100 #endif // BOOST_PP_IS_ITERATING 101