diff --git a/AK/StdLibExtraDetails.h b/AK/StdLibExtraDetails.h index dc479082d21..e856e3e6847 100644 --- a/AK/StdLibExtraDetails.h +++ b/AK/StdLibExtraDetails.h @@ -636,6 +636,42 @@ struct __InvokeResult { template using InvokeResult = typename __InvokeResult::type; +template +struct EquivalentFunctionTypeImpl; + +template class Function, typename T, typename... Args> +struct EquivalentFunctionTypeImpl> { + using Type = T(Args...); +}; + +template +struct EquivalentFunctionTypeImpl { + using Type = T(Args...); +}; + +template +struct EquivalentFunctionTypeImpl { + using Type = T(Args...); +}; + +template +struct EquivalentFunctionTypeImpl { + using Type = typename EquivalentFunctionTypeImpl::Type; +}; + +template +struct EquivalentFunctionTypeImpl { + using Type = T(Args...); +}; + +template +struct EquivalentFunctionTypeImpl { + using Type = T(Args...); +}; + +template +using EquivalentFunctionType = typename EquivalentFunctionTypeImpl::Type; + } #if !USING_AK_GLOBALLY @@ -651,6 +687,7 @@ using AK::Detail::Conditional; using AK::Detail::CopyConst; using AK::Detail::declval; using AK::Detail::DependentFalse; +using AK::Detail::EquivalentFunctionType; using AK::Detail::FalseType; using AK::Detail::IdentityType; using AK::Detail::IndexSequence;