| 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_set_fwd.hpp> |
| 9 | |
| 10 | namespace boost { |
| 11 | namespace unordered { |
| 12 | namespace detail { |
| 13 | template <typename A, typename T, typename H, typename P> struct set |
| 14 | { |
| 15 | typedef boost::unordered::detail::set<A, T, H, P> types; |
| 16 | |
| 17 | typedef T value_type; |
| 18 | typedef H hasher; |
| 19 | typedef P key_equal; |
| 20 | typedef T 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::table<types> table; |
| 29 | typedef boost::unordered::detail::set_extractor<value_type> ; |
| 30 | |
| 31 | typedef typename boost::allocator_void_pointer<value_allocator>::type |
| 32 | void_pointer; |
| 33 | |
| 34 | typedef boost::unordered::node_handle_set< |
| 35 | node<value_type, void_pointer>, T, A> |
| 36 | node_type; |
| 37 | |
| 38 | typedef typename table::c_iterator iterator; |
| 39 | typedef boost::unordered::insert_return_type_set<iterator, node_type> |
| 40 | insert_return_type; |
| 41 | }; |
| 42 | |
| 43 | template <typename T, typename H, typename P, typename A> |
| 44 | class instantiate_set |
| 45 | { |
| 46 | typedef boost::unordered_set<T, 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 T, typename H, typename P, typename A> |
| 53 | class instantiate_multiset |
| 54 | { |
| 55 | typedef boost::unordered_multiset<T, H, P, A> container; |
| 56 | container x; |
| 57 | typename container::node_type node_type; |
| 58 | }; |
| 59 | } |
| 60 | } |
| 61 | } |
| 62 | |