@@ -842,7 +842,7 @@ namespace hud
842842 explicit constexpr hashset_impl () noexcept = default;
843843
844844 constexpr explicit hashset_impl (const allocator_type &allocator) noexcept
845- : compressed_(hud::tag_piecewise_construct, hud::forward_as_tuple(allocator), hud::forward_as_tuple(), hud::forward_as_tuple())
845+ : compressed_(hud::tag_piecewise_construct, hud::forward_as_tuple(allocator), hud::forward_as_tuple(), hud::forward_as_tuple(), hud::forward_as_tuple() )
846846 {
847847 }
848848
@@ -861,7 +861,7 @@ namespace hud
861861 constexpr explicit hashset_impl (const hashset_impl<u_storage_t , u_hasher_t , u_key_equal_t , u_allocator_t > &other, const allocator_type &allocator) noexcept
862862 : max_slot_count_ {other.max_count ()}
863863 , count_ {other.count ()}
864- , compressed_ {hud::tag_piecewise_construct, hud::forward_as_tuple (allocator), hud::forward_as_tuple (), hud::forward_as_tuple (other.free_slot_before_grow_compressed ())}
864+ , compressed_ {hud::tag_piecewise_construct, hud::forward_as_tuple (allocator), hud::forward_as_tuple (), hud::forward_as_tuple (), hud::forward_as_tuple ( other.free_slot_before_grow_compressed ())}
865865 {
866866 copy_construct (other);
867867 }
@@ -876,7 +876,7 @@ namespace hud
876876 constexpr explicit hashset_impl (const hashset_impl<u_storage_t , u_hasher_t , u_key_equal_t , u_allocator_t > &other, usize extra_max_count, const allocator_type &allocator) noexcept
877877 : max_slot_count_ {normalize_max_count (other.max_count () + extra_max_count)}
878878 , count_ {other.count ()}
879- , compressed_(hud::tag_piecewise_construct, hud::forward_as_tuple(allocator), hud::forward_as_tuple(), hud::forward_as_tuple(max_slot_before_grow(max_slot_count_) - count_))
879+ , compressed_(hud::tag_piecewise_construct, hud::forward_as_tuple(allocator), hud::forward_as_tuple(), hud::forward_as_tuple(), hud::forward_as_tuple( max_slot_before_grow(max_slot_count_) - count_))
880880 {
881881 copy_construct (other, extra_max_count);
882882 }
@@ -891,7 +891,7 @@ namespace hud
891891 constexpr explicit hashset_impl (hashset_impl<u_storage_t , u_hasher_t , u_key_equal_t , u_allocator_t > &&other, const allocator_type &allocator) noexcept
892892 : max_slot_count_ {other.max_count ()}
893893 , count_ {other.count ()}
894- , compressed_(hud::tag_piecewise_construct, hud::forward_as_tuple(allocator), hud::forward_as_tuple(), hud::forward_as_tuple(other.free_slot_before_grow_compressed()))
894+ , compressed_(hud::tag_piecewise_construct, hud::forward_as_tuple(allocator), hud::forward_as_tuple(), hud::forward_as_tuple(), hud::forward_as_tuple( other.free_slot_before_grow_compressed()))
895895 {
896896 move_construct (hud::forward<hashset_impl<u_storage_t , u_hasher_t , u_key_equal_t , u_allocator_t >>(other));
897897 }
@@ -906,7 +906,7 @@ namespace hud
906906 constexpr explicit hashset_impl (hashset_impl<u_storage_t , u_hasher_t , u_key_equal_t , u_allocator_t > &&other, usize extra_max_count, const allocator_type &allocator) noexcept
907907 : max_slot_count_ {normalize_max_count (other.max_count () + extra_max_count)}
908908 , count_ {other.count ()}
909- , compressed_(hud::tag_piecewise_construct, hud::forward_as_tuple(allocator), hud::forward_as_tuple(), hud::forward_as_tuple(max_slot_before_grow(max_slot_count_) - count_))
909+ , compressed_(hud::tag_piecewise_construct, hud::forward_as_tuple(allocator), hud::forward_as_tuple(), hud::forward_as_tuple(), hud::forward_as_tuple( max_slot_before_grow(max_slot_count_) - count_))
910910 {
911911 move_construct (hud::forward<hashset_impl<u_storage_t , u_hasher_t , u_key_equal_t , u_allocator_t >>(other), extra_max_count);
912912 }
@@ -1247,7 +1247,7 @@ namespace hud
12471247 {
12481248 usize slot_index_that_match_h2 {slot_index + group_index_that_match_h2 & max_slot_count_};
12491249 slot_type *slot_that_match_h2 {slot_ptr_ + slot_index_that_match_h2};
1250- if (key_equal_ (slot_that_match_h2->key (), hud::forward<K>(key))) [[likely]]
1250+ if (key_equal () (slot_that_match_h2->key (), hud::forward<K>(key))) [[likely]]
12511251 {
12521252 return iterator {control_ptr_ + slot_index_that_match_h2, slot_that_match_h2};
12531253 }
@@ -1626,7 +1626,7 @@ namespace hud
16261626 {
16271627 usize slot_index_that_match_h2 {slot_index + group_index_that_match_h2 & max_slot_count_};
16281628 slot_type *slot_that_match_h2 {slot_ptr_ + slot_index_that_match_h2};
1629- if (key_equal_ (slot_that_match_h2->key (), key)) [[likely]]
1629+ if (key_equal () (slot_that_match_h2->key (), key)) [[likely]]
16301630 {
16311631 return {
16321632 iterator {control_ptr_ + slot_index_that_match_h2, slot_that_match_h2},
@@ -1953,12 +1953,12 @@ namespace hud
19531953
19541954 [[nodiscard]] constexpr usize &free_slot_before_grow_compressed () noexcept
19551955 {
1956- return hud::get<2 >(compressed_);
1956+ return hud::get<3 >(compressed_);
19571957 }
19581958
19591959 [[nodiscard]] constexpr const usize &free_slot_before_grow_compressed () const noexcept
19601960 {
1961- return hud::get<2 >(compressed_);
1961+ return hud::get<3 >(compressed_);
19621962 }
19631963
19641964 [[nodiscard]] constexpr allocator_type &allocator_mut () noexcept
@@ -1976,14 +1976,24 @@ namespace hud
19761976 return hud::get<1 >(compressed_);
19771977 }
19781978
1979+ [[nodiscard]] constexpr key_equal_type &key_equal () noexcept
1980+ {
1981+ return hud::get<2 >(compressed_);
1982+ }
1983+
1984+ [[nodiscard]] constexpr const key_equal_type &key_equal () const noexcept
1985+ {
1986+ return hud::get<2 >(compressed_);
1987+ }
1988+
19791989 private:
19801990 /* * Max count of slot in the map. Always a power of two mask value. */
19811991 usize max_slot_count_ {0 };
19821992
19831993 /* * The count of values in the hashmap. */
19841994 usize count_ {0 };
19851995
1986- hud::compressed_tuple<allocator_type, hasher_type, usize> compressed_ {hud::tag_init};
1996+ hud::compressed_tuple<allocator_type, hasher_type, key_equal_type, usize> compressed_ {hud::tag_init};
19871997
19881998 /* * The allocator. */
19891999 // allocator_type allocator_;
@@ -1992,7 +2002,7 @@ namespace hud
19922002 // hasher_type hasher_;
19932003
19942004 /* * The key equal function. */
1995- key_equal_type key_equal_;
2005+ // key_equal_type key_equal_;
19962006
19972007 /* * The control of the hashmap. Initialized to sentinel. */
19982008 control_type *control_ptr_ {const_cast <control_type *>(&INIT_GROUP[16 ])};
0 commit comments