1 | |
2 | // Copyright (C) 2005-2016 Daniel James |
3 | // Distributed under the Boost Software License, Version 1.0. (See accompanying |
4 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
5 | |
6 | #include <boost/unordered/detail/implementation.hpp> |
7 | #include <boost/unordered/unordered_map_fwd.hpp> |
8 | |
9 | namespace boost { |
10 | namespace unordered { |
11 | namespace detail { |
12 | template <typename A, typename K, typename M, typename H, typename P> |
13 | struct map |
14 | { |
15 | typedef boost::unordered::detail::map<A, K, M, H, P> types; |
16 | |
17 | typedef std::pair<K const, M> value_type; |
18 | typedef H hasher; |
19 | typedef P key_equal; |
20 | typedef K const const_key_type; |
21 | |
22 | typedef |
23 | typename ::boost::unordered::detail::rebind_wrap<A, value_type>::type |
24 | value_allocator; |
25 | typedef boost::unordered::detail::allocator_traits<value_allocator> |
26 | value_allocator_traits; |
27 | |
28 | typedef boost::unordered::detail::pick_node<A, value_type> pick; |
29 | typedef typename pick::node node; |
30 | typedef typename pick::bucket bucket; |
31 | typedef typename pick::link_pointer link_pointer; |
32 | |
33 | typedef boost::unordered::detail::table<types> table; |
34 | typedef boost::unordered::detail::map_extractor<value_type> ; |
35 | |
36 | typedef typename boost::unordered::detail::pick_policy<K>::type policy; |
37 | |
38 | typedef boost::unordered::iterator_detail::iterator<node> iterator; |
39 | typedef boost::unordered::iterator_detail::c_iterator<node> c_iterator; |
40 | typedef boost::unordered::iterator_detail::l_iterator<node> l_iterator; |
41 | typedef boost::unordered::iterator_detail::cl_iterator<node> |
42 | cl_iterator; |
43 | |
44 | typedef boost::unordered::node_handle_map<node, K, M, A> node_type; |
45 | typedef boost::unordered::insert_return_type_map<node, K, M, A> |
46 | insert_return_type; |
47 | }; |
48 | |
49 | template <typename K, typename M, typename H, typename P, typename A> |
50 | class instantiate_map |
51 | { |
52 | typedef boost::unordered_map<K, M, H, P, A> container; |
53 | container x; |
54 | typename container::node_type node_type; |
55 | typename container::insert_return_type insert_return_type; |
56 | }; |
57 | |
58 | template <typename K, typename M, typename H, typename P, typename A> |
59 | class instantiate_multimap |
60 | { |
61 | typedef boost::unordered_multimap<K, M, H, P, A> container; |
62 | container x; |
63 | typename container::node_type node_type; |
64 | }; |
65 | } |
66 | } |
67 | } |
68 | |