Files
boost_mpl/include/boost/mpl/placeholders.hpp
T
2004-07-26 00:32:12 +00:00

77 lines
1.8 KiB
C++

#if !defined(BOOST_PP_IS_ITERATING)
///// header body
#ifndef BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED
#define BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED
// + file: boost/mpl/placeholders.hpp
// + last modified: 25/feb/03
// Copyright (c) 2001-03
// Peter Dimov, Aleksey Gurtovoy
//
// 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)
//
// See http://www.boost.org/libs/mpl for documentation.
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
# include "boost/mpl/arg.hpp"
#endif
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER placeholders.hpp
# include "boost/mpl/aux_/include_preprocessed.hpp"
#else
# include "boost/mpl/aux_/config/nttp.hpp"
# include "boost/mpl/limits/arity.hpp"
# include "boost/preprocessor/iterate.hpp"
# include "boost/preprocessor/cat.hpp"
namespace boost {
namespace mpl {
// watch out for GNU gettext users, who #define _(x)
#if !defined(_) || defined(BOOST_MPL_NO_UNNAMED_PLACEHOLDER_SUPPORT)
typedef arg<-1> _;
namespace placeholders {
using boost::mpl::_;
}
#endif
//: agurt, 17/mar/02: one more placeholder for the last 'apply#'
//: specialization
#define BOOST_PP_ITERATION_PARAMS_1 \
(3,(1, BOOST_MPL_METAFUNCTION_MAX_ARITY + 1, "boost/mpl/placeholders.hpp"))
#include BOOST_PP_ITERATE()
} // namespace mpl
} // namespace boost
#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS
#endif // BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED
///// iteration
#else
#define i BOOST_PP_FRAME_ITERATION(1)
typedef arg<i> BOOST_PP_CAT(_,i);
namespace placeholders {
using boost::mpl::BOOST_PP_CAT(_,i);
}
#undef i
#endif // BOOST_PP_IS_ITERATING