Files
boost_mpl/include/boost/mpl/placeholders.hpp
T

101 lines
2.4 KiB
C++
Raw Normal View History

2003-02-25 23:11:41 +00:00
#if !defined(BOOST_PP_IS_ITERATING)
///// header body
#ifndef BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED
#define BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED
2004-09-16 14:09:12 +00:00
// Copyright Aleksey Gurtovoy 2001-2004
2004-09-02 15:41:37 +00:00
// Copyright Peter Dimov 2001-2003
2003-02-25 23:11:41 +00:00
//
2004-09-02 15:41:37 +00:00
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
2003-02-25 23:11:41 +00:00
//
// See http://www.boost.org/libs/mpl for documentation.
2004-09-02 15:41:37 +00:00
// $Source$
// $Date$
// $Revision$
2003-02-25 23:11:41 +00:00
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
2004-09-02 15:41:37 +00:00
# include <boost/mpl/arg.hpp>
# include <boost/mpl/aux_/adl_barrier.hpp>
2004-09-16 14:09:12 +00:00
# if !defined(BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE)
# define BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(type) \
using ::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::type; \
/**/
# else
# define BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(type) /**/
# endif
2003-02-25 23:11:41 +00:00
#endif
2004-09-02 15:41:37 +00:00
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
2003-02-25 23:11:41 +00:00
2004-09-02 15:41:37 +00:00
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
2003-02-25 23:11:41 +00:00
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER placeholders.hpp
2004-09-02 15:41:37 +00:00
# include <boost/mpl/aux_/include_preprocessed.hpp>
2003-02-25 23:11:41 +00:00
#else
2004-09-02 15:41:37 +00:00
# include <boost/mpl/aux_/nttp_decl.hpp>
# include <boost/mpl/limits/arity.hpp>
# include <boost/preprocessor/iterate.hpp>
# include <boost/preprocessor/cat.hpp>
2003-02-25 23:11:41 +00:00
// watch out for GNU gettext users, who #define _(x)
2004-09-02 15:41:37 +00:00
#if !defined(_) || defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT)
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
2003-02-25 23:11:41 +00:00
typedef arg<-1> _;
2004-09-02 15:41:37 +00:00
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
2004-09-16 14:09:12 +00:00
namespace boost { namespace mpl {
BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_)
namespace placeholders {
2004-09-02 15:41:37 +00:00
using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_;
2004-09-16 14:09:12 +00:00
}
}}
2003-02-25 23:11:41 +00:00
#endif
2004-09-02 15:41:37 +00:00
/// agurt, 17/mar/02: one more placeholder for the last 'apply#'
/// specialization
2003-02-25 23:11:41 +00:00
#define BOOST_PP_ITERATION_PARAMS_1 \
2004-09-02 15:41:37 +00:00
(3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY + 1, <boost/mpl/placeholders.hpp>))
2003-02-25 23:11:41 +00:00
#include BOOST_PP_ITERATE()
2004-09-02 15:41:37 +00:00
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
2003-02-25 23:11:41 +00:00
#endif // BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED
///// iteration
#else
2004-09-16 14:09:12 +00:00
#define i_ BOOST_PP_FRAME_ITERATION(1)
2003-02-25 23:11:41 +00:00
2004-09-02 15:41:37 +00:00
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
2004-09-16 14:09:12 +00:00
typedef arg<i_> BOOST_PP_CAT(_,i_);
2003-02-25 23:11:41 +00:00
2004-09-02 15:41:37 +00:00
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
2004-09-16 14:09:12 +00:00
namespace boost { namespace mpl {
2003-02-25 23:11:41 +00:00
2004-09-16 14:09:12 +00:00
BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(BOOST_PP_CAT(_,i_))
namespace placeholders {
using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::BOOST_PP_CAT(_,i_);
}
}}
#undef i_
2003-02-25 23:11:41 +00:00
#endif // BOOST_PP_IS_ITERATING