| 1 | |
| 2 | // Copyright (C) 2005-2016 Daniel James |
| 3 | // Copyright (C) 2022 Christian Mazakas |
| 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 | #include <boost/unordered/detail/implementation.hpp> |
| 8 | #include <boost/unordered/unordered_map_fwd.hpp> |
| 9 | |
| 10 | namespace boost { |
| 11 | namespace unordered { |
| 12 | namespace detail { |
| 13 | template <typename A, typename K, typename M, typename H, typename P> |
| 14 | struct map |
| 15 | { |
| 16 | typedef boost::unordered::detail::map<A, K, M, H, P> types; |
| 17 | |
| 18 | typedef std::pair<K const, M> value_type; |
| 19 | typedef H hasher; |
| 20 | typedef P key_equal; |
| 21 | typedef K const const_key_type; |
| 22 | |
| 23 | typedef |
| 24 | typename ::boost::unordered::detail::rebind_wrap<A, value_type>::type |
| 25 | value_allocator; |
| 26 | typedef boost::unordered::detail::allocator_traits<value_allocator> |
| 27 | value_allocator_traits; |
| 28 | |
| 29 | typedef boost::unordered::detail::table<types> table; |
| 30 | typedef boost::unordered::detail::map_extractor<value_type> ; |
| 31 | |
| 32 | typedef typename boost::allocator_void_pointer<value_allocator>::type |
| 33 | void_pointer; |
| 34 | |
| 35 | typedef boost::unordered::node_handle_map< |
| 36 | node<value_type, void_pointer>, K, M, A> |
| 37 | node_type; |
| 38 | |
| 39 | typedef typename table::iterator iterator; |
| 40 | typedef boost::unordered::insert_return_type_map<iterator, node_type> insert_return_type; |
| 41 | }; |
| 42 | |
| 43 | template <typename K, typename M, typename H, typename P, typename A> |
| 44 | class instantiate_map |
| 45 | { |
| 46 | typedef boost::unordered_map<K, M, H, P, A> container; |
| 47 | container x; |
| 48 | typename container::node_type node_type; |
| 49 | typename container::insert_return_type insert_return_type; |
| 50 | }; |
| 51 | |
| 52 | template <typename K, typename M, typename H, typename P, typename A> |
| 53 | class instantiate_multimap |
| 54 | { |
| 55 | typedef boost::unordered_multimap<K, M, H, P, A> container; |
| 56 | container x; |
| 57 | typename container::node_type node_type; |
| 58 | }; |
| 59 | } |
| 60 | } |
| 61 | } |
| 62 | |