diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2022-01-29 20:01:35 +0200 |
---|---|---|
committer | Idan Horowitz <idan.horowitz@gmail.com> | 2022-01-29 23:01:23 +0200 |
commit | 9b0d90a71d7af496e9e2721ad134ce25b18a58fb (patch) | |
tree | 4ce30d798b0d9dd5b7b917f146121f457c93dd65 /AK/Traits.h | |
parent | 4a99170cd2b0778b3445ade45f268d25f4822226 (diff) | |
download | serenity-9b0d90a71d7af496e9e2721ad134ce25b18a58fb.zip |
AK: Support using custom comparison operations for hash compatible keys
Diffstat (limited to 'AK/Traits.h')
-rw-r--r-- | AK/Traits.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/AK/Traits.h b/AK/Traits.h index b1d60f325f..a797d4da96 100644 --- a/AK/Traits.h +++ b/AK/Traits.h @@ -20,6 +20,8 @@ struct GenericTraits { using ConstPeekType = T; static constexpr bool is_trivial() { return false; } static constexpr bool equals(const T& a, const T& b) { return a == b; } + template<Concepts::HashCompatible<T> U> + static bool equals(U const& a, T const& b) { return a == b; } }; template<typename T> |