]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/fusion/container/deque/detail/cpp03/as_deque.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / fusion / container / deque / detail / cpp03 / as_deque.hpp
1 /*=============================================================================
2 Copyright (c) 2005-2012 Joel de Guzman
3 Copyright (c) 2006 Dan Marsden
4
5 Distributed under the Boost Software License, Version 1.0. (See accompanying
6 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 ==============================================================================*/
8 #ifndef BOOST_PP_IS_ITERATING
9 #if !defined(FUSION_AS_DEQUE_20061213_2210)
10 #define FUSION_AS_DEQUE_20061213_2210
11
12 #include <boost/preprocessor/iterate.hpp>
13 #include <boost/preprocessor/repetition/enum_params.hpp>
14 #include <boost/preprocessor/repetition/enum_binary_params.hpp>
15 #include <boost/preprocessor/repetition/repeat.hpp>
16 #include <boost/preprocessor/cat.hpp>
17 #include <boost/preprocessor/inc.hpp>
18 #include <boost/preprocessor/dec.hpp>
19 #include <boost/fusion/container/deque/deque.hpp>
20 #include <boost/fusion/iterator/value_of.hpp>
21 #include <boost/fusion/iterator/deref.hpp>
22 #include <boost/fusion/iterator/next.hpp>
23
24 namespace boost { namespace fusion { namespace detail
25 {
26 BOOST_FUSION_BARRIER_BEGIN
27
28 template <int size>
29 struct as_deque;
30
31 template <>
32 struct as_deque<0>
33 {
34 template <typename Iterator>
35 struct apply
36 {
37 typedef deque<> type;
38 };
39
40 template <typename Iterator>
41 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
42 static typename apply<Iterator>::type
43 call(Iterator)
44 {
45 return deque<>();
46 }
47 };
48
49 BOOST_FUSION_BARRIER_END
50 }}}
51
52 #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
53 #include <boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque.hpp>
54 #else
55 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
56 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/as_deque" FUSION_MAX_DEQUE_SIZE_STR ".hpp")
57 #endif
58
59 /*=============================================================================
60 Copyright (c) 2001-2011 Joel de Guzman
61
62 Distributed under the Boost Software License, Version 1.0. (See accompanying
63 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
64
65 This is an auto-generated file. Do not edit!
66 ==============================================================================*/
67
68 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
69 #pragma wave option(preserve: 1)
70 #endif
71
72 namespace boost { namespace fusion { namespace detail
73 {
74 BOOST_FUSION_BARRIER_BEGIN
75
76 #define BOOST_FUSION_NEXT_ITERATOR(z, n, data) \
77 typedef typename fusion::result_of::next<BOOST_PP_CAT(I, n)>::type \
78 BOOST_PP_CAT(I, BOOST_PP_INC(n));
79
80 #define BOOST_FUSION_NEXT_CALL_ITERATOR(z, n, data) \
81 typename gen::BOOST_PP_CAT(I, BOOST_PP_INC(n)) \
82 BOOST_PP_CAT(i, BOOST_PP_INC(n)) = fusion::next(BOOST_PP_CAT(i, n));
83
84 #define BOOST_FUSION_VALUE_OF_ITERATOR(z, n, data) \
85 typedef typename fusion::result_of::value_of<BOOST_PP_CAT(I, n)>::type \
86 BOOST_PP_CAT(T, n);
87
88 #define BOOST_PP_FILENAME_1 <boost/fusion/container/deque/detail/cpp03/as_deque.hpp>
89 #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE)
90 #include BOOST_PP_ITERATE()
91
92 #undef BOOST_FUSION_NEXT_ITERATOR
93 #undef BOOST_FUSION_NEXT_CALL_ITERATOR
94 #undef BOOST_FUSION_VALUE_OF_ITERATOR
95
96 BOOST_FUSION_BARRIER_END
97 }}}
98
99 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
100 #pragma wave option(output: null)
101 #endif
102
103 #endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
104
105 #endif
106 #else // defined(BOOST_PP_IS_ITERATING)
107 ///////////////////////////////////////////////////////////////////////////////
108 //
109 // Preprocessor vertical repetition code
110 //
111 ///////////////////////////////////////////////////////////////////////////////
112
113 #define N BOOST_PP_ITERATION()
114
115 template <>
116 struct as_deque<N>
117 {
118 template <typename I0>
119 struct apply
120 {
121 BOOST_PP_REPEAT(N, BOOST_FUSION_NEXT_ITERATOR, _)
122 BOOST_PP_REPEAT(N, BOOST_FUSION_VALUE_OF_ITERATOR, _)
123 typedef deque<BOOST_PP_ENUM_PARAMS(N, T)> type;
124 };
125
126 template <typename Iterator>
127 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
128 static typename apply<Iterator>::type
129 call(Iterator const& i0)
130 {
131 typedef apply<Iterator> gen;
132 typedef typename gen::type result;
133 BOOST_PP_REPEAT(BOOST_PP_DEC(N), BOOST_FUSION_NEXT_CALL_ITERATOR, _)
134 return result(BOOST_PP_ENUM_PARAMS(N, *i));
135 }
136 };
137
138 #undef N
139 #endif // defined(BOOST_PP_IS_ITERATING)
140