File indexing completed on 2025-01-18 09:33:39
0001
0002
0003
0004
0005
0006
0007 #if !defined(FUSION_MAP_07212005_1106)
0008 #define FUSION_MAP_07212005_1106
0009
0010 #include <boost/fusion/support/config.hpp>
0011 #include <boost/fusion/support/pair.hpp>
0012 #include <boost/fusion/support/category_of.hpp>
0013 #include <boost/fusion/support/detail/access.hpp>
0014 #include <boost/fusion/container/map/detail/cpp03/map_fwd.hpp>
0015 #include <boost/fusion/container/map/detail/cpp03/at_impl.hpp>
0016 #include <boost/fusion/container/map/detail/cpp03/value_at_impl.hpp>
0017 #include <boost/fusion/container/map/detail/cpp03/begin_impl.hpp>
0018 #include <boost/fusion/container/map/detail/cpp03/end_impl.hpp>
0019 #include <boost/fusion/container/map/detail/cpp03/value_of_impl.hpp>
0020 #include <boost/fusion/container/map/detail/cpp03/deref_data_impl.hpp>
0021 #include <boost/fusion/container/map/detail/cpp03/deref_impl.hpp>
0022 #include <boost/fusion/container/map/detail/cpp03/key_of_impl.hpp>
0023 #include <boost/fusion/container/map/detail/cpp03/value_of_data_impl.hpp>
0024 #include <boost/fusion/container/vector/vector.hpp>
0025 #include <boost/mpl/identity.hpp>
0026 #include <boost/mpl/bool.hpp>
0027 #include <boost/preprocessor/iterate.hpp>
0028 #include <boost/preprocessor/repetition/enum_params.hpp>
0029 #include <boost/preprocessor/repetition/enum_binary_params.hpp>
0030 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && \
0031 defined(BOOST_MSVC) && (BOOST_MSVC == 1700)
0032
0033 #include <boost/core/enable_if.hpp>
0034 #include <boost/type_traits/is_same.hpp>
0035 #endif
0036
0037 #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
0038 #include <boost/fusion/container/map/detail/cpp03/preprocessed/map.hpp>
0039 #else
0040 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
0041 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/map" FUSION_MAX_MAP_SIZE_STR ".hpp")
0042 #endif
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
0054 #pragma wave option(preserve: 1)
0055 #endif
0056
0057 #define FUSION_HASH #
0058
0059 namespace boost { namespace fusion
0060 {
0061 struct void_;
0062 struct fusion_sequence_tag;
0063
0064 template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_MAP_SIZE, typename T)>
0065 struct map : sequence_base<map<BOOST_PP_ENUM_PARAMS(FUSION_MAX_MAP_SIZE, T)> >
0066 {
0067 struct category : random_access_traversal_tag, associative_tag {};
0068
0069 typedef map_tag fusion_tag;
0070 typedef fusion_sequence_tag tag;
0071 typedef mpl::false_ is_view;
0072
0073 typedef vector<
0074 BOOST_PP_ENUM_PARAMS(FUSION_MAX_MAP_SIZE, T)>
0075 storage_type;
0076
0077 typedef typename storage_type::size size;
0078
0079 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0080 map()
0081 : data() {}
0082
0083 BOOST_FUSION_GPU_ENABLED
0084 map(map const& rhs)
0085 : data(rhs.data) {}
0086
0087 template <typename Sequence>
0088 BOOST_FUSION_GPU_ENABLED
0089 map(Sequence const& rhs)
0090 : data(rhs) {}
0091
0092 #include <boost/fusion/container/map/detail/cpp03/map_forward_ctor.hpp>
0093
0094 template <typename T>
0095 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0096 map& operator=(T const& rhs)
0097 {
0098 data = rhs;
0099 return *this;
0100 }
0101
0102 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0103 map& operator=(map const& rhs)
0104 {
0105 data = rhs.data;
0106 return *this;
0107 }
0108
0109 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
0110 FUSION_HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
0111 #endif
0112 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \
0113 (defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES))
0114 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0115 map(map&& rhs)
0116 : data(std::move(rhs.data)) {}
0117
0118 template <typename T>
0119 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0120 map& operator=(T&& rhs)
0121 {
0122 data = BOOST_FUSION_FWD_ELEM(T, rhs);
0123 return *this;
0124 }
0125
0126 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0127 map& operator=(map&& rhs)
0128 {
0129 data = std::move(rhs.data);
0130 return *this;
0131 }
0132 #endif
0133 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
0134 FUSION_HASH endif
0135 #endif
0136
0137 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0138 storage_type& get_data() { return data; }
0139 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0140 storage_type const& get_data() const { return data; }
0141
0142 private:
0143
0144 storage_type data;
0145 };
0146 }}
0147
0148 #undef FUSION_HASH
0149
0150 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
0151 #pragma wave option(output: null)
0152 #endif
0153
0154 #endif
0155
0156 #endif