]> git.lyx.org Git - lyx.git/blob - boost/boost/mpl/placeholders.hpp
Boost 1.31.0
[lyx.git] / boost / boost / mpl / placeholders.hpp
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 // + file: boost/mpl/placeholders.hpp
10 // + last modified: 25/feb/03
11
12 // Copyright (c) 2001-03
13 // Peter Dimov, Aleksey Gurtovoy
14 //
15 // Permission to use, copy, modify, distribute and sell this software
16 // and its documentation for any purpose is hereby granted without fee, 
17 // provided that the above copyright notice appears in all copies and 
18 // that both the copyright notice and this permission notice appear in 
19 // supporting documentation. No representations are made about the 
20 // suitability of this software for any purpose. It is provided "as is" 
21 // without express or implied warranty.
22 //
23 // See http://www.boost.org/libs/mpl for documentation.
24
25 #if !defined(BOOST_MPL_PREPROCESSING_MODE)
26 #   include "boost/mpl/arg.hpp"
27 #endif
28
29 #include "boost/mpl/aux_/config/use_preprocessed.hpp"
30
31 #if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \
32  && !defined(BOOST_MPL_PREPROCESSING_MODE)
33
34 #   define BOOST_MPL_PREPROCESSED_HEADER placeholders.hpp
35 #   include "boost/mpl/aux_/include_preprocessed.hpp"
36
37 #else
38
39 #   include "boost/mpl/aux_/config/nttp.hpp"
40 #   include "boost/mpl/limits/arity.hpp"
41 #   include "boost/preprocessor/iterate.hpp"
42 #   include "boost/preprocessor/cat.hpp"
43
44 namespace boost {
45 namespace mpl {
46
47 // watch out for GNU gettext users, who #define _(x)
48 #if !defined(_) || defined(BOOST_MPL_NO_UNNAMED_PLACEHOLDER_SUPPORT)
49 typedef arg<-1> _;
50
51 namespace placeholders {
52 using boost::mpl::_;
53 }
54 #endif
55
56 //: agurt, 17/mar/02: one more placeholder for the last 'apply#' 
57 //: specialization
58 #define BOOST_PP_ITERATION_PARAMS_1 \
59     (3,(1, BOOST_MPL_METAFUNCTION_MAX_ARITY + 1, "boost/mpl/placeholders.hpp"))
60 #include BOOST_PP_ITERATE()
61
62 } // namespace mpl
63 } // namespace boost 
64
65 #endif // BOOST_MPL_USE_PREPROCESSED_HEADERS
66 #endif // BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED
67
68 ///// iteration
69
70 #else
71 #define i BOOST_PP_FRAME_ITERATION(1)
72
73 typedef arg<i> BOOST_PP_CAT(_,i);
74
75 namespace placeholders {
76 using boost::mpl::BOOST_PP_CAT(_,i);
77 }
78
79 #undef i
80 #endif // BOOST_PP_IS_ITERATING