Chris@16
|
1 /*=============================================================================
|
Chris@16
|
2 Copyright (c) 2001-2011 Joel de Guzman
|
Chris@16
|
3
|
Chris@16
|
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
|
Chris@16
|
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
6 ==============================================================================*/
|
Chris@16
|
7 #if !defined(FUSION_MAP_07212005_1106)
|
Chris@16
|
8 #define FUSION_MAP_07212005_1106
|
Chris@16
|
9
|
Chris@101
|
10 #include <boost/fusion/support/config.hpp>
|
Chris@16
|
11 #include <boost/fusion/support/pair.hpp>
|
Chris@16
|
12 #include <boost/fusion/support/category_of.hpp>
|
Chris@16
|
13 #include <boost/fusion/support/detail/access.hpp>
|
Chris@16
|
14 #include <boost/fusion/container/map/detail/cpp03/map_fwd.hpp>
|
Chris@16
|
15 #include <boost/fusion/container/map/detail/cpp03/at_impl.hpp>
|
Chris@16
|
16 #include <boost/fusion/container/map/detail/cpp03/value_at_impl.hpp>
|
Chris@16
|
17 #include <boost/fusion/container/map/detail/cpp03/begin_impl.hpp>
|
Chris@16
|
18 #include <boost/fusion/container/map/detail/cpp03/end_impl.hpp>
|
Chris@16
|
19 #include <boost/fusion/container/map/detail/cpp03/value_of_impl.hpp>
|
Chris@16
|
20 #include <boost/fusion/container/map/detail/cpp03/deref_data_impl.hpp>
|
Chris@16
|
21 #include <boost/fusion/container/map/detail/cpp03/deref_impl.hpp>
|
Chris@16
|
22 #include <boost/fusion/container/map/detail/cpp03/key_of_impl.hpp>
|
Chris@16
|
23 #include <boost/fusion/container/map/detail/cpp03/value_of_data_impl.hpp>
|
Chris@16
|
24 #include <boost/fusion/container/vector/vector.hpp>
|
Chris@16
|
25 #include <boost/mpl/identity.hpp>
|
Chris@16
|
26 #include <boost/mpl/bool.hpp>
|
Chris@101
|
27 #include <boost/preprocessor/iterate.hpp>
|
Chris@101
|
28 #include <boost/preprocessor/repetition/enum_params.hpp>
|
Chris@101
|
29 #include <boost/preprocessor/repetition/enum_binary_params.hpp>
|
Chris@101
|
30 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && \
|
Chris@101
|
31 defined(BOOST_MSVC) && (BOOST_MSVC == 1700)
|
Chris@101
|
32 // see map_forward_ctor.hpp
|
Chris@101
|
33 #include <boost/core/enable_if.hpp>
|
Chris@101
|
34 #include <boost/type_traits/is_same.hpp>
|
Chris@101
|
35 #endif
|
Chris@16
|
36
|
Chris@16
|
37 #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
|
Chris@16
|
38 #include <boost/fusion/container/map/detail/cpp03/preprocessed/map.hpp>
|
Chris@16
|
39 #else
|
Chris@16
|
40 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
Chris@101
|
41 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/map" FUSION_MAX_MAP_SIZE_STR ".hpp")
|
Chris@16
|
42 #endif
|
Chris@16
|
43
|
Chris@16
|
44 /*=============================================================================
|
Chris@16
|
45 Copyright (c) 2001-2011 Joel de Guzman
|
Chris@16
|
46
|
Chris@16
|
47 Distributed under the Boost Software License, Version 1.0. (See accompanying
|
Chris@16
|
48 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
49
|
Chris@16
|
50 This is an auto-generated file. Do not edit!
|
Chris@16
|
51 ==============================================================================*/
|
Chris@16
|
52
|
Chris@16
|
53 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
Chris@16
|
54 #pragma wave option(preserve: 1)
|
Chris@16
|
55 #endif
|
Chris@16
|
56
|
Chris@101
|
57 #define FUSION_HASH #
|
Chris@101
|
58
|
Chris@16
|
59 namespace boost { namespace fusion
|
Chris@16
|
60 {
|
Chris@16
|
61 struct void_;
|
Chris@16
|
62 struct fusion_sequence_tag;
|
Chris@16
|
63
|
Chris@16
|
64 template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_MAP_SIZE, typename T)>
|
Chris@16
|
65 struct map : sequence_base<map<BOOST_PP_ENUM_PARAMS(FUSION_MAX_MAP_SIZE, T)> >
|
Chris@16
|
66 {
|
Chris@16
|
67 struct category : random_access_traversal_tag, associative_tag {};
|
Chris@16
|
68
|
Chris@16
|
69 typedef map_tag fusion_tag;
|
Chris@16
|
70 typedef fusion_sequence_tag tag; // this gets picked up by MPL
|
Chris@16
|
71 typedef mpl::false_ is_view;
|
Chris@16
|
72
|
Chris@16
|
73 typedef vector<
|
Chris@16
|
74 BOOST_PP_ENUM_PARAMS(FUSION_MAX_MAP_SIZE, T)>
|
Chris@16
|
75 storage_type;
|
Chris@16
|
76
|
Chris@16
|
77 typedef typename storage_type::size size;
|
Chris@16
|
78
|
Chris@101
|
79 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
Chris@16
|
80 map()
|
Chris@16
|
81 : data() {}
|
Chris@16
|
82
|
Chris@101
|
83 BOOST_FUSION_GPU_ENABLED
|
Chris@101
|
84 map(map const& rhs)
|
Chris@101
|
85 : data(rhs.data) {}
|
Chris@101
|
86
|
Chris@16
|
87 template <typename Sequence>
|
Chris@101
|
88 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
Chris@16
|
89 map(Sequence const& rhs)
|
Chris@16
|
90 : data(rhs) {}
|
Chris@16
|
91
|
Chris@16
|
92 #include <boost/fusion/container/map/detail/cpp03/map_forward_ctor.hpp>
|
Chris@16
|
93
|
Chris@16
|
94 template <typename T>
|
Chris@101
|
95 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
Chris@16
|
96 map& operator=(T const& rhs)
|
Chris@16
|
97 {
|
Chris@16
|
98 data = rhs;
|
Chris@16
|
99 return *this;
|
Chris@16
|
100 }
|
Chris@16
|
101
|
Chris@101
|
102 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
Chris@16
|
103 map& operator=(map const& rhs)
|
Chris@16
|
104 {
|
Chris@16
|
105 data = rhs.data;
|
Chris@16
|
106 return *this;
|
Chris@16
|
107 }
|
Chris@16
|
108
|
Chris@101
|
109 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
Chris@101
|
110 FUSION_HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
Chris@101
|
111 #endif
|
Chris@101
|
112 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \
|
Chris@101
|
113 (defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES))
|
Chris@101
|
114 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
Chris@101
|
115 map(map&& rhs)
|
Chris@101
|
116 : data(std::move(rhs.data)) {}
|
Chris@101
|
117
|
Chris@101
|
118 template <typename T>
|
Chris@101
|
119 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
Chris@101
|
120 map& operator=(T&& rhs)
|
Chris@101
|
121 {
|
Chris@101
|
122 data = BOOST_FUSION_FWD_ELEM(T, rhs);
|
Chris@101
|
123 return *this;
|
Chris@101
|
124 }
|
Chris@101
|
125
|
Chris@101
|
126 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
Chris@101
|
127 map& operator=(map&& rhs)
|
Chris@101
|
128 {
|
Chris@101
|
129 data = std::move(rhs.data);
|
Chris@101
|
130 return *this;
|
Chris@101
|
131 }
|
Chris@101
|
132 #endif
|
Chris@101
|
133 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
Chris@101
|
134 FUSION_HASH endif
|
Chris@101
|
135 #endif
|
Chris@101
|
136
|
Chris@101
|
137 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
Chris@16
|
138 storage_type& get_data() { return data; }
|
Chris@101
|
139 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
Chris@16
|
140 storage_type const& get_data() const { return data; }
|
Chris@16
|
141
|
Chris@16
|
142 private:
|
Chris@16
|
143
|
Chris@16
|
144 storage_type data;
|
Chris@16
|
145 };
|
Chris@16
|
146 }}
|
Chris@16
|
147
|
Chris@101
|
148 #undef FUSION_HASH
|
Chris@101
|
149
|
Chris@16
|
150 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
Chris@16
|
151 #pragma wave option(output: null)
|
Chris@16
|
152 #endif
|
Chris@16
|
153
|
Chris@16
|
154 #endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
|
Chris@16
|
155
|
Chris@16
|
156 #endif
|