[#header_unordered_set]
== `<boost/unordered/unordered_set.hpp>` Synopsis

:idprefix: header_unordered_set_

Defines `xref:reference/unordered_set.adoc#unordered_set[boost::unordered_set]`,
`xref:reference/unordered_multiset.adoc#unordered_multiset[boost::unordered_multiset]`
and associated functions and alias templates.

[listing,subs="+macros,+quotes"]
-----

namespace boost {
namespace unordered {

  template<class Key,
           class Hash = boost::hash<Key>,
           class Pred = std::equal_to<Key>,
           class Allocator = std::allocator<Key>>
  class xref:reference/unordered_set.adoc#unordered_set[unordered_set];

  // Tag for construction from ranges (pass:[C++20] and up)
  struct from_range_t { explicit from_range_t() = default; };
  inline constexpr from_range_t from_range{};

  // Equality Comparisons
  template<class Key, class Hash, class Pred, class Alloc>
    bool xref:reference/unordered_set.adoc#unordered_set_operator[operator++==++](const unordered_set<Key, Hash, Pred, Alloc>& x,
                    const unordered_set<Key, Hash, Pred, Alloc>& y);

  template<class Key, class Hash, class Pred, class Alloc>
    bool xref:reference/unordered_set.adoc#unordered_set_operator_2[operator!=](const unordered_set<Key, Hash, Pred, Alloc>& x,
                    const unordered_set<Key, Hash, Pred, Alloc>& y);

  // swap
  template<class Key, class Hash, class Pred, class Alloc>
    void xref:reference/unordered_set.adoc#unordered_set_swap_2[swap](unordered_set<Key, Hash, Pred, Alloc>& x,
              unordered_set<Key, Hash, Pred, Alloc>& y)
      noexcept(noexcept(x.swap(y)));

  // Erasure
  template<class K, class H, class P, class A, class Predicate>
    typename unordered_set<K, H, P, A>::size_type
      xref:reference/unordered_set.adoc#unordered_set_erase_if[erase_if](unordered_set<K, H, P, A>& c, Predicate pred);

  template<class Key,
           class Hash = boost::hash<Key>,
           class Pred = std::equal_to<Key>,
           class Allocator = std::allocator<Key>>
  class xref:reference/unordered_multiset.adoc#unordered_multiset[unordered_multiset];

  // Equality Comparisons
  template<class Key, class Hash, class Pred, class Alloc>
    bool xref:reference/unordered_multiset.adoc#unordered_multiset_operator[operator++==++](const unordered_multiset<Key, Hash, Pred, Alloc>& x,
                    const unordered_multiset<Key, Hash, Pred, Alloc>& y);

  template<class Key, class Hash, class Pred, class Alloc>
    bool xref:reference/unordered_multiset.adoc#unordered_multiset_operator_2[operator!=](const unordered_multiset<Key, Hash, Pred, Alloc>& x,
                    const unordered_multiset<Key, Hash, Pred, Alloc>& y);

  // swap
  template<class Key, class Hash, class Pred, class Alloc>
    void xref:reference/unordered_multiset.adoc#unordered_multiset_swap_2[swap](unordered_multiset<Key, Hash, Pred, Alloc>& x,
              unordered_multiset<Key, Hash, Pred, Alloc>& y)
      noexcept(noexcept(x.swap(y)));

  // Erasure
  template<class K, class H, class P, class A, class Predicate>
    typename unordered_multiset<K, H, P, A>::size_type
      xref:reference/unordered_multiset.adoc#unordered_multiset_erase_if[erase_if](unordered_multiset<K, H, P, A>& c, Predicate pred);

  // Pmr aliases (pass:[C++17] and up)
  namespace pmr {
    template<class Key,
             class Hash = boost::hash<Key>,
             class Pred = std::equal_to<Key>>
    using unordered_set =
      boost::unordered::unordered_set<Key, Hash, Pred,
        std::pmr::polymorphic_allocator<Key>>;

    template<class Key,
             class Hash = boost::hash<Key>,
             class Pred = std::equal_to<Key>>
    using unordered_multiset =
      boost::unordered::unordered_multiset<Key, Hash, Pred,
        std::pmr::polymorphic_allocator<Key>>;
  } // namespace pmr

} // namespace unordered

using unordered::unordered_set;
using unordered::unordered_multiset;

} // namespace boost
-----
