]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/fusion/container/generation/detail/pp_map_tie.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / fusion / container / generation / detail / pp_map_tie.hpp
1 /*=============================================================================
2 Copyright (c) 2001-2011 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_PP_MAP_TIE_20060814_1116)
10 #define FUSION_PP_MAP_TIE_20060814_1116
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/enum_params_with_a_default.hpp>
16 #include <boost/preprocessor/repetition/repeat_from_to.hpp>
17 #include <boost/fusion/container/map/map.hpp>
18 #include <boost/fusion/container/map/detail/cpp03/limits.hpp>
19 #include <boost/fusion/support/pair.hpp>
20 #include <boost/fusion/container/generation/pair_tie.hpp>
21 #include <boost/type_traits/add_reference.hpp>
22
23 #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
24 #include <boost/fusion/container/generation/detail/preprocessed/map_tie.hpp>
25 #else
26 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
27 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/map_tie" FUSION_MAX_MAP_SIZE_STR".hpp")
28 #endif
29
30 /*=============================================================================
31 Copyright (c) 2001-2011 Joel de Guzman
32
33 Distributed under the Boost Software License, Version 1.0. (See accompanying
34 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
35
36 This is an auto-generated file. Do not edit!
37 ==============================================================================*/
38
39 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
40 #pragma wave option(preserve: 1)
41 #endif
42
43 namespace boost { namespace fusion
44 {
45 struct void_;
46
47 namespace result_of
48 {
49 template <
50 BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
51 FUSION_MAX_MAP_SIZE, typename K, void_)
52 , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
53 FUSION_MAX_MAP_SIZE, typename D, void_)
54 , typename Extra = void_
55 >
56 struct map_tie;
57
58 template <>
59 struct map_tie<>
60 {
61 typedef map<> type;
62 };
63 }
64
65 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
66 inline map<>
67 map_tie()
68 {
69 return map<>();
70 }
71
72 #define BOOST_FUSION_TIED_PAIR(z, n, data) \
73 fusion::pair< \
74 BOOST_PP_CAT(K, n) \
75 , typename add_reference<BOOST_PP_CAT(D, n)>::type>
76
77 #define BOOST_FUSION_PAIR_TIE(z, n, _) \
78 fusion::pair_tie<BOOST_PP_CAT(K, n)>(BOOST_PP_CAT(_, n)) \
79
80 #define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/detail/pp_map_tie.hpp>
81 #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_MAP_SIZE)
82 #include BOOST_PP_ITERATE()
83
84 #undef BOOST_FUSION_PAIR
85 #undef BOOST_FUSION_MAKE_PAIR
86
87 }}
88
89 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
90 #pragma wave option(output: null)
91 #endif
92
93 #endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
94
95 #endif
96 #else // defined(BOOST_PP_IS_ITERATING)
97 ///////////////////////////////////////////////////////////////////////////////
98 //
99 // Preprocessor vertical repetition code
100 //
101 ///////////////////////////////////////////////////////////////////////////////
102
103 #define N BOOST_PP_ITERATION()
104
105 namespace result_of
106 {
107 template <
108 BOOST_PP_ENUM_PARAMS(N, typename K)
109 , BOOST_PP_ENUM_PARAMS(N, typename D)
110 >
111 #define TEXT(z, n, text) , text
112 struct map_tie<BOOST_PP_ENUM_PARAMS(N, K), BOOST_PP_ENUM_PARAMS(N, D) BOOST_PP_REPEAT_FROM_TO(N, FUSION_MAX_MAP_SIZE, TEXT, void_) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_MAP_SIZE, TEXT, void_)>
113 #undef TEXT
114 {
115 typedef map<BOOST_PP_ENUM(N, BOOST_FUSION_TIED_PAIR, _)> type;
116 };
117 }
118
119 template <
120 BOOST_PP_ENUM_PARAMS(N, typename K)
121 , BOOST_PP_ENUM_PARAMS(N, typename D)
122 >
123 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
124 inline map<BOOST_PP_ENUM(N, BOOST_FUSION_TIED_PAIR, _)>
125 map_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, D, & arg))
126 {
127 return map<BOOST_PP_ENUM(N, BOOST_FUSION_TIED_PAIR, _)>(
128 BOOST_PP_ENUM(N, BOOST_FUSION_PAIR_TIE, arg));
129 }
130
131 #undef N
132 #endif // defined(BOOST_PP_IS_ITERATING)
133