From 72c047f4f002eff7d5058b34849e55a048fb6add Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 21 Nov 2022 09:10:00 +0100 Subject: [PATCH] util/IntrusiveHashSet: add hash_function(), key_eq() --- src/util/IntrusiveHashSet.hxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/util/IntrusiveHashSet.hxx b/src/util/IntrusiveHashSet.hxx index cdcc76bd6..1d911f0e0 100644 --- a/src/util/IntrusiveHashSet.hxx +++ b/src/util/IntrusiveHashSet.hxx @@ -143,9 +143,22 @@ public: using const_pointer = const T *; using size_type = std::size_t; + using hasher = Hash; + using key_equal = Equal; + [[nodiscard]] IntrusiveHashSet() noexcept = default; + [[nodiscard]] + constexpr const hasher &hash_function() const noexcept { + return hash; + } + + [[nodiscard]] + constexpr const key_equal key_eq() const noexcept { + return equal; + } + [[nodiscard]] constexpr bool empty() noexcept { if constexpr (constant_time_size)