set.hpp 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. // Copyright (C) 2005-2016 Daniel James
  2. // Copyright (C) 2022 Christian Mazakas
  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. #include <boost/unordered/detail/implementation.hpp>
  6. #include <boost/unordered/unordered_set_fwd.hpp>
  7. namespace boost {
  8. namespace unordered {
  9. namespace detail {
  10. template <typename A, typename T, typename H, typename P> struct set
  11. {
  12. typedef boost::unordered::detail::set<A, T, H, P> types;
  13. typedef T value_type;
  14. typedef H hasher;
  15. typedef P key_equal;
  16. typedef T const const_key_type;
  17. typedef
  18. typename ::boost::unordered::detail::rebind_wrap<A, value_type>::type
  19. value_allocator;
  20. typedef boost::unordered::detail::allocator_traits<value_allocator>
  21. value_allocator_traits;
  22. typedef boost::unordered::detail::table<types> table;
  23. typedef boost::unordered::detail::set_extractor<value_type> extractor;
  24. typedef typename boost::allocator_void_pointer<value_allocator>::type
  25. void_pointer;
  26. typedef boost::unordered::node_handle_set<
  27. node<value_type, void_pointer>, T, A>
  28. node_type;
  29. typedef typename table::c_iterator iterator;
  30. typedef boost::unordered::insert_return_type_set<iterator, node_type>
  31. insert_return_type;
  32. };
  33. template <typename T, typename H, typename P, typename A>
  34. class instantiate_set
  35. {
  36. typedef boost::unordered_set<T, H, P, A> container;
  37. container x;
  38. typename container::node_type node_type;
  39. typename container::insert_return_type insert_return_type;
  40. };
  41. template <typename T, typename H, typename P, typename A>
  42. class instantiate_multiset
  43. {
  44. typedef boost::unordered_multiset<T, H, P, A> container;
  45. container x;
  46. typename container::node_type node_type;
  47. };
  48. }
  49. }
  50. }