From dfe2cf3a40952953e77f731e8039fc64655622df Mon Sep 17 00:00:00 2001 From: Hendiadyoin1 Date: Sun, 7 Nov 2021 14:34:55 +0100 Subject: [PATCH] AK: Add a Decay helper for Concepts --- AK/StdLibExtraDetails.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/AK/StdLibExtraDetails.h b/AK/StdLibExtraDetails.h index 41f1ccc5302..85fb4342552 100644 --- a/AK/StdLibExtraDetails.h +++ b/AK/StdLibExtraDetails.h @@ -557,6 +557,22 @@ inline constexpr bool IsSpecializationOf = false; template typename U, typename... Us> inline constexpr bool IsSpecializationOf, U> = true; +template +struct __decay { + typedef Detail::RemoveCVReference type; +}; +template +struct __decay { + typedef T* type; +}; +template +struct __decay { + typedef T* type; +}; +// FIXME: Function decay +template +using Decay = typename __decay::type; + } using AK::Detail::AddConst; using AK::Detail::AddLvalueReference;