]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/proto/include/boost/proto/detail/args.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / proto / include / boost / proto / detail / args.hpp
1 #if !defined(BOOST_PROTO_DONT_USE_PREPROCESSED_FILES)
2
3 #include <boost/proto/detail/preprocessed/args.hpp>
4
5 #elif !defined(BOOST_PP_IS_ITERATING)
6
7 /// INTERNAL ONLY
8 ///
9 #define BOOST_PROTO_DEFINE_CHILD_N(Z, N, DATA) \
10 typedef BOOST_PP_CAT(Arg, N) BOOST_PP_CAT(child, N); \
11 /**< INTERNAL ONLY */
12
13 /// INTERNAL ONLY
14 ///
15 #define BOOST_PROTO_DEFINE_VOID_N(z, n, data) \
16 typedef mpl::void_ BOOST_PP_CAT(child, n); \
17 /**< INTERNAL ONLY */
18
19 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
20 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/args.hpp")
21 #endif
22
23 ///////////////////////////////////////////////////////////////////////////////
24 /// \file args.hpp
25 /// Contains definition of \c term\<\>, \c list1\<\>, \c list2\<\>, ...
26 /// class templates.
27 //
28 // Copyright 2008 Eric Niebler. Distributed under the Boost
29 // Software License, Version 1.0. (See accompanying file
30 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
31
32 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
33 #pragma wave option(preserve: 1)
34 #endif
35
36 /// \brief A type sequence, for use as the 2nd parameter to the \c expr\<\> class template.
37 ///
38 /// A type sequence, for use as the 2nd parameter to the \c expr\<\> class template.
39 /// The types in the sequence correspond to the children of a node in an expression tree.
40 template< typename Arg0 >
41 struct term
42 {
43 static const long arity = 0;
44 typedef Arg0 child0;
45 BOOST_PP_REPEAT_FROM_TO(1, BOOST_PROTO_MAX_ARITY, BOOST_PROTO_DEFINE_VOID_N, ~)
46
47 /// INTERNAL ONLY
48 ///
49 typedef Arg0 back_;
50 };
51
52 #define BOOST_PP_ITERATION_PARAMS_1 \
53 (3, (1, BOOST_PROTO_MAX_ARITY, <boost/proto/detail/args.hpp>))
54 #include BOOST_PP_ITERATE()
55
56 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
57 #pragma wave option(output: null)
58 #endif
59
60 #undef BOOST_PROTO_DEFINE_VOID_N
61 #undef BOOST_PROTO_DEFINE_CHILD_N
62
63 #else
64
65 #define N BOOST_PP_ITERATION()
66
67 /// \brief A type sequence, for use as the 2nd parameter to the \c expr\<\> class template.
68 ///
69 /// A type sequence, for use as the 2nd parameter to the \c expr\<\> class template.
70 /// The types in the sequence correspond to the children of a node in an expression tree.
71 template< BOOST_PP_ENUM_PARAMS(N, typename Arg) >
72 struct BOOST_PP_CAT(list, N)
73 {
74 static const long arity = N;
75 BOOST_PP_REPEAT(N, BOOST_PROTO_DEFINE_CHILD_N, ~)
76 BOOST_PP_REPEAT_FROM_TO(N, BOOST_PROTO_MAX_ARITY, BOOST_PROTO_DEFINE_VOID_N, ~)
77
78 /// INTERNAL ONLY
79 ///
80 typedef BOOST_PP_CAT(Arg, BOOST_PP_DEC(N)) back_;
81 };
82
83 #undef N
84
85 #endif