util/IntrusiveHashSet: replace template parameters Hash/Equal with a single one
Preparing to add a key extraction function. Without this "Operators" template parameter, we'd have even more template parameters, and that parameter list would grow too complex. Better wrap it in one single template that contains all operators. This is an API change which all callers need to adjust to, but it will be worth it.
This commit is contained in:

committed by
Max Kellermann

parent
dcd7c6337c
commit
2cd5f4cd3e
@@ -38,7 +38,9 @@ TEST(IntrusiveHashSet, Basic)
|
||||
{
|
||||
IntItem a{1}, b{2}, c{3}, d{4}, e{5}, f{1};
|
||||
|
||||
IntrusiveHashSet<IntItem, 3> set;
|
||||
IntrusiveHashSet<IntItem, 3,
|
||||
IntrusiveHashSetOperators<IntItem::Hash,
|
||||
IntItem::Equal>> set;
|
||||
|
||||
{
|
||||
auto [position, inserted] = set.insert_check(2);
|
||||
|
Reference in New Issue
Block a user