unordered_set_fwd.hpp 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. // Copyright (C) 2008-2011 Daniel James.
  2. // Copyright (C) 2022 Christian Mazakas
  3. // Copyright (C) 2024 Braden Ganetsky
  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. #ifndef BOOST_UNORDERED_SET_FWD_HPP_INCLUDED
  7. #define BOOST_UNORDERED_SET_FWD_HPP_INCLUDED
  8. #include <boost/config.hpp>
  9. #if defined(BOOST_HAS_PRAGMA_ONCE)
  10. #pragma once
  11. #endif
  12. #include <boost/container_hash/hash_fwd.hpp>
  13. #include <functional>
  14. #include <memory>
  15. #ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE
  16. #include <memory_resource>
  17. #endif
  18. namespace boost {
  19. namespace unordered {
  20. template <class T, class H = boost::hash<T>, class P = std::equal_to<T>,
  21. class A = std::allocator<T> >
  22. class unordered_set;
  23. template <class T, class H, class P, class A>
  24. inline bool operator==(
  25. unordered_set<T, H, P, A> const&, unordered_set<T, H, P, A> const&);
  26. template <class T, class H, class P, class A>
  27. inline bool operator!=(
  28. unordered_set<T, H, P, A> const&, unordered_set<T, H, P, A> const&);
  29. template <class T, class H, class P, class A>
  30. inline void swap(unordered_set<T, H, P, A>& m1,
  31. unordered_set<T, H, P, A>& m2) noexcept(noexcept(m1.swap(m2)));
  32. template <class K, class H, class P, class A, class Predicate>
  33. typename unordered_set<K, H, P, A>::size_type erase_if(
  34. unordered_set<K, H, P, A>& c, Predicate pred);
  35. template <class T, class H = boost::hash<T>, class P = std::equal_to<T>,
  36. class A = std::allocator<T> >
  37. class unordered_multiset;
  38. template <class T, class H, class P, class A>
  39. inline bool operator==(unordered_multiset<T, H, P, A> const&,
  40. unordered_multiset<T, H, P, A> const&);
  41. template <class T, class H, class P, class A>
  42. inline bool operator!=(unordered_multiset<T, H, P, A> const&,
  43. unordered_multiset<T, H, P, A> const&);
  44. template <class T, class H, class P, class A>
  45. inline void swap(unordered_multiset<T, H, P, A>& m1,
  46. unordered_multiset<T, H, P, A>& m2) noexcept(noexcept(m1.swap(m2)));
  47. template <class K, class H, class P, class A, class Predicate>
  48. typename unordered_multiset<K, H, P, A>::size_type erase_if(
  49. unordered_multiset<K, H, P, A>& c, Predicate pred);
  50. template <class N, class T, class A> class node_handle_set;
  51. template <class Iter, class NodeType> struct insert_return_type_set;
  52. #ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE
  53. namespace pmr {
  54. template <class T, class H = boost::hash<T>, class P = std::equal_to<T> >
  55. using unordered_set = boost::unordered::unordered_set<T, H, P,
  56. std::pmr::polymorphic_allocator<T> >;
  57. template <class T, class H = boost::hash<T>, class P = std::equal_to<T> >
  58. using unordered_multiset = boost::unordered::unordered_multiset<T, H, P,
  59. std::pmr::polymorphic_allocator<T> >;
  60. } // namespace pmr
  61. #endif
  62. } // namespace unordered
  63. using boost::unordered::unordered_multiset;
  64. using boost::unordered::unordered_set;
  65. } // namespace boost
  66. #endif