diff options
author | Hendiadyoin1 <leon2002.la@gmail.com> | 2021-11-07 14:50:41 +0100 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2021-12-15 13:09:49 +0330 |
commit | c8bee92fb9ae1479077071cd5ffed58be77d0b26 (patch) | |
tree | d519408f64b452854db199c8428614560b55e38d /AK/Concepts.h | |
parent | 92e824afa184527c3d95d68235cca3e4d00a7670 (diff) | |
download | serenity-c8bee92fb9ae1479077071cd5ffed58be77d0b26.zip |
AK: Add the concept of hash-compatible types
Diffstat (limited to 'AK/Concepts.h')
-rw-r--r-- | AK/Concepts.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/AK/Concepts.h b/AK/Concepts.h index 2996e43633..00580face5 100644 --- a/AK/Concepts.h +++ b/AK/Concepts.h @@ -36,6 +36,9 @@ concept SameAs = IsSame<T, U>; template<typename T> concept AnyString = Detail::IsConstructible<StringView, T>; +template<typename T, typename U> +concept HashCompatible = IsHashCompatible<Detail::Decay<T>, Detail::Decay<U>>; + // FIXME: remove once Clang formats these properly. // clang-format off template<typename Func, typename... Args> |