diff --git a/include/momo/HashSorter.h b/include/momo/HashSorter.h index e081adae..2833134b 100644 --- a/include/momo/HashSorter.h +++ b/include/momo/HashSorter.h @@ -175,8 +175,7 @@ class HashSorter template, internal::conceptHashFunc HashFunc = HashCoder, - internal::conceptEqualFunc EqualFunc = std::equal_to<>> - requires internal::conceptEqualFunc + internal::conceptEqualFunc EqualFunc = std::equal_to<>> static FindResult Find(Iterator begin, size_t count, const ItemArg& itemArg, HashCode argHash, HashFunc hashFunc = HashFunc(), EqualFunc equalFunc = EqualFunc()) @@ -189,9 +188,8 @@ class HashSorter template, - internal::conceptEqualFunc EqualFunc = std::equal_to<>> - requires std::is_same_v> && - internal::conceptEqualFunc + internal::conceptEqualFunc EqualFunc = std::equal_to<>> + requires std::is_same_v> static FindResult FindPrehashed(Iterator begin, size_t count, const ItemArg& itemArg, HashCode argHash, HashIterator hashBegin, EqualFunc equalFunc = EqualFunc()) { @@ -203,8 +201,7 @@ class HashSorter template, internal::conceptHashFunc HashFunc = HashCoder, - internal::conceptEqualFunc EqualFunc = std::equal_to<>> - requires internal::conceptEqualFunc + internal::conceptEqualFunc EqualFunc = std::equal_to<>> static Bounds GetBounds(Iterator begin, size_t count, const ItemArg& itemArg, HashCode argHash, HashFunc hashFunc = HashFunc(), EqualFunc equalFunc = EqualFunc()) @@ -217,9 +214,8 @@ class HashSorter template, - internal::conceptEqualFunc EqualFunc = std::equal_to<>> - requires std::is_same_v> && - internal::conceptEqualFunc + internal::conceptEqualFunc EqualFunc = std::equal_to<>> + requires std::is_same_v> static Bounds GetBoundsPrehashed(Iterator begin, size_t count, const ItemArg& itemArg, HashCode argHash, HashIterator hashBegin, EqualFunc equalFunc = EqualFunc()) { @@ -230,8 +226,9 @@ class HashSorter private: template, internal::conceptConstFunctor IterHashFunc, - internal::conceptEqualFunc> EqualFunc, + internal::conceptEqualFunc EqualFunc, internal::conceptConstFunctor IterSwapper> static void pvSort(Iterator begin, size_t count, FastCopyableFunctor iterHashFunc, FastCopyableFunctor equalFunc, FastCopyableFunctor iterSwapper) @@ -246,7 +243,8 @@ class HashSorter } template> EqualFunc, + conceptObject Item = std::iter_value_t, + internal::conceptEqualFunc EqualFunc, internal::conceptConstFunctor IterSwapper> static void pvGroup(Iterator begin, size_t count, FastCopyableFunctor equalFunc, FastCopyableFunctor iterSwapper) @@ -267,8 +265,9 @@ class HashSorter } template, internal::conceptConstFunctor IterHashFunc, - internal::conceptEqualFunc> EqualFunc> + internal::conceptEqualFunc EqualFunc> static bool pvIsSorted(Iterator begin, size_t count, FastCopyableFunctor iterHashFunc, FastCopyableFunctor equalFunc) { @@ -291,7 +290,8 @@ class HashSorter } template> EqualFunc> + conceptObject Item = std::iter_value_t, + internal::conceptEqualFunc EqualFunc> static bool pvIsGrouped(Iterator begin, size_t count, FastCopyableFunctor equalFunc) { for (size_t i = 1; i < count; ++i) @@ -308,8 +308,9 @@ class HashSorter } template, internal::conceptConstFunctor IterHashFunc, - internal::conceptEqualFunc, ItemArg> EqualFunc> + internal::conceptEqualFunc EqualFunc> static FindResult pvFind(Iterator begin, size_t count, const ItemArg& itemArg, HashCode argHash, FastCopyableFunctor iterHashFunc, FastCopyableFunctor equalFunc) @@ -328,8 +329,9 @@ class HashSorter } template, internal::conceptConstFunctor IterHashFunc, - internal::conceptEqualFunc, ItemArg> EqualFunc> + internal::conceptEqualFunc EqualFunc> static Bounds pvGetBounds(Iterator begin, size_t count, const ItemArg& itemArg, HashCode argHash, FastCopyableFunctor iterHashFunc, FastCopyableFunctor equalFunc) @@ -361,8 +363,9 @@ class HashSorter } template, internal::conceptConstFunctor IterHashFunc, - internal::conceptEqualFunc, ItemArg> EqualFunc> + internal::conceptEqualFunc EqualFunc> static FindResult pvFindNext(Iterator begin, size_t count, const ItemArg& itemArg, HashCode argHash, FastCopyableFunctor iterHashFunc, FastCopyableFunctor equalFunc) @@ -380,7 +383,8 @@ class HashSorter } template> EqualFunc> + conceptObject Item = std::iter_value_t, + internal::conceptEqualFunc EqualFunc> static Iterator pvFindOther(Iterator begin, size_t count, FastCopyableFunctor equalFunc) { diff --git a/include/momo/KeyUtility.h b/include/momo/KeyUtility.h index 2a5c7e46..b7bf3a5d 100644 --- a/include/momo/KeyUtility.h +++ b/include/momo/KeyUtility.h @@ -25,8 +25,9 @@ namespace momo namespace internal { template - concept conceptEqualFunc = conceptPredicate; + typename KeyArg = Key, typename... KeyArgs> + concept conceptEqualFunc = conceptPredicate && + (conceptPredicate && ...); template concept conceptLessFunc = conceptPredicate;