unordered_flat_set_fwd.hpp 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // Copyright (C) 2022 Christian Mazakas
  2. // Copyright (C) 2024 Braden Ganetsky
  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. #ifndef BOOST_UNORDERED_FLAT_SET_FWD_HPP_INCLUDED
  6. #define BOOST_UNORDERED_FLAT_SET_FWD_HPP_INCLUDED
  7. #include <boost/config.hpp>
  8. #if defined(BOOST_HAS_PRAGMA_ONCE)
  9. #pragma once
  10. #endif
  11. #include <boost/container_hash/hash_fwd.hpp>
  12. #include <functional>
  13. #include <memory>
  14. #ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE
  15. #include <memory_resource>
  16. #endif
  17. namespace boost {
  18. namespace unordered {
  19. template <class Key, class Hash = boost::hash<Key>,
  20. class KeyEqual = std::equal_to<Key>,
  21. class Allocator = std::allocator<Key> >
  22. class unordered_flat_set;
  23. template <class Key, class Hash, class KeyEqual, class Allocator>
  24. bool operator==(
  25. unordered_flat_set<Key, Hash, KeyEqual, Allocator> const& lhs,
  26. unordered_flat_set<Key, Hash, KeyEqual, Allocator> const& rhs);
  27. template <class Key, class Hash, class KeyEqual, class Allocator>
  28. bool operator!=(
  29. unordered_flat_set<Key, Hash, KeyEqual, Allocator> const& lhs,
  30. unordered_flat_set<Key, Hash, KeyEqual, Allocator> const& rhs);
  31. template <class Key, class Hash, class KeyEqual, class Allocator>
  32. void swap(unordered_flat_set<Key, Hash, KeyEqual, Allocator>& lhs,
  33. unordered_flat_set<Key, Hash, KeyEqual, Allocator>& rhs)
  34. noexcept(noexcept(lhs.swap(rhs)));
  35. #ifndef BOOST_NO_CXX17_HDR_MEMORY_RESOURCE
  36. namespace pmr {
  37. template <class Key, class Hash = boost::hash<Key>,
  38. class KeyEqual = std::equal_to<Key> >
  39. using unordered_flat_set = boost::unordered::unordered_flat_set<Key, Hash,
  40. KeyEqual, std::pmr::polymorphic_allocator<Key> >;
  41. } // namespace pmr
  42. #endif
  43. } // namespace unordered
  44. using boost::unordered::unordered_flat_set;
  45. } // namespace boost
  46. #endif