diff options
author | AnotherTest <ali.mpfard@gmail.com> | 2020-12-26 14:41:58 +0330 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-12-26 12:32:27 +0100 |
commit | ad646420dd25bff4532faed3f4919168df01144c (patch) | |
tree | 620f106b11b0b036dacf2ee2e4d4b013063fed83 /AK | |
parent | a9184fcb76d01304bdf3b206d52d315ce52e28ac (diff) | |
download | serenity-ad646420dd25bff4532faed3f4919168df01144c.zip |
AK: Make AK::IsSame<T, U>::value a constexpr bool
It being an enum value was preventing it from being used without `!!` in
requires clauses (bool also makes more sense anyway).
Diffstat (limited to 'AK')
-rw-r--r-- | AK/StdLibExtras.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/AK/StdLibExtras.h b/AK/StdLibExtras.h index 0e673d81c1..e6b58ebfee 100644 --- a/AK/StdLibExtras.h +++ b/AK/StdLibExtras.h @@ -276,16 +276,12 @@ struct RemovePointer<T* const volatile> { template<typename T, typename U> struct IsSame { - enum { - value = 0 - }; + static constexpr bool value = false; }; template<typename T> struct IsSame<T, T> { - enum { - value = 1 - }; + static constexpr bool value = true; }; template<bool condition, class TrueType, class FalseType> |