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