set.hpp 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. // Copyright (C) 2005-2016 Daniel James
  2. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  3. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  4. #include <boost/unordered/detail/implementation.hpp>
  5. #include <boost/unordered/unordered_set_fwd.hpp>
  6. namespace boost {
  7. namespace unordered {
  8. namespace detail {
  9. template <typename A, typename T, typename H, typename P> struct set
  10. {
  11. typedef boost::unordered::detail::set<A, T, H, P> types;
  12. typedef T value_type;
  13. typedef H hasher;
  14. typedef P key_equal;
  15. typedef T const const_key_type;
  16. typedef
  17. typename ::boost::unordered::detail::rebind_wrap<A, value_type>::type
  18. value_allocator;
  19. typedef boost::unordered::detail::allocator_traits<value_allocator>
  20. value_allocator_traits;
  21. typedef boost::unordered::detail::pick_node<A, value_type> pick;
  22. typedef typename pick::node node;
  23. typedef typename pick::bucket bucket;
  24. typedef typename pick::link_pointer link_pointer;
  25. typedef boost::unordered::detail::table<types> table;
  26. typedef boost::unordered::detail::set_extractor<value_type> extractor;
  27. typedef typename boost::unordered::detail::pick_policy<T>::type policy;
  28. typedef boost::unordered::iterator_detail::c_iterator<node> iterator;
  29. typedef boost::unordered::iterator_detail::c_iterator<node> c_iterator;
  30. typedef boost::unordered::iterator_detail::cl_iterator<node> l_iterator;
  31. typedef boost::unordered::iterator_detail::cl_iterator<node>
  32. cl_iterator;
  33. typedef boost::unordered::node_handle_set<node, T, A> node_type;
  34. typedef boost::unordered::insert_return_type_set<node, T, A>
  35. insert_return_type;
  36. };
  37. template <typename T, typename H, typename P, typename A>
  38. class instantiate_set
  39. {
  40. typedef boost::unordered_set<T, H, P, A> container;
  41. container x;
  42. typename container::node_type node_type;
  43. typename container::insert_return_type insert_return_type;
  44. };
  45. template <typename T, typename H, typename P, typename A>
  46. class instantiate_multiset
  47. {
  48. typedef boost::unordered_multiset<T, H, P, A> container;
  49. container x;
  50. typename container::node_type node_type;
  51. };
  52. }
  53. }
  54. }