util/IntrusiveHashSet: add hash_function(), key_eq()

This commit is contained in:
Max Kellermann 2022-11-21 09:10:00 +01:00
parent c71958af4b
commit 72c047f4f0

View File

@ -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)