1 /*=============================================================================
2 Copyright (c) 2005 Joel de Guzman
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 #if !defined(FUSION_MAP_07212005_1106)
8 #define FUSION_MAP_07212005_1106
10 #include <boost/fusion/support/pair.hpp>
11 #include <boost/fusion/support/category_of.hpp>
12 #include <boost/fusion/support/detail/access.hpp>
13 #include <boost/fusion/container/map/map_fwd.hpp>
14 #include <boost/fusion/container/map/detail/lookup_key.hpp>
15 #include <boost/fusion/container/map/detail/begin_impl.hpp>
16 #include <boost/fusion/container/map/detail/end_impl.hpp>
17 #include <boost/fusion/container/map/detail/at_key_impl.hpp>
18 #include <boost/fusion/container/map/detail/value_at_key_impl.hpp>
19 #include <boost/fusion/container/vector/vector.hpp>
20 #include <boost/mpl/identity.hpp>
21 #include <boost/mpl/bool.hpp>
23 namespace boost
{ namespace fusion
27 struct fusion_sequence_tag
;
29 template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_MAP_SIZE
, typename T
)>
30 struct map
: sequence_base
<map
<BOOST_PP_ENUM_PARAMS(FUSION_MAX_MAP_SIZE
, T
)> >
32 struct category
: forward_traversal_tag
, associative_sequence_tag
{};
34 typedef map_tag fusion_tag
;
35 typedef fusion_sequence_tag tag
; // this gets picked up by MPL
36 typedef mpl::false_ is_view
;
39 BOOST_PP_ENUM_PARAMS(FUSION_MAX_MAP_SIZE
, T
)>
42 typedef typename
storage_type::size size
;
47 template <typename Sequence
>
48 map(Sequence
const& rhs
)
51 #include <boost/fusion/container/map/detail/map_forward_ctor.hpp>
52 #include <boost/fusion/container/map/detail/map_lookup.hpp>
56 operator=(T
const& rhs
)
62 storage_type
& get_data() { return data
; }
63 storage_type
const& get_data() const { return data
; }