diff --git a/AK/Function.h b/AK/Function.h index f202429fa6a9fe23f7f4b267f834f16743fcb923..5c9f690c9155f1f15a037f3375aff417418cabc4 100644 --- a/AK/Function.h +++ b/AK/Function.h @@ -36,6 +36,16 @@ namespace AK { +namespace Detail { + +template +inline constexpr bool IsCallableWithArguments = requires(T t) { + t(declval()...); + }; +} + +using Detail::IsCallableWithArguments; + template class Function; @@ -271,4 +281,5 @@ private: #if USING_AK_GLOBALLY using AK::Function; +using AK::IsCallableWithArguments; #endif diff --git a/AK/StdLibExtraDetails.h b/AK/StdLibExtraDetails.h index b2a0bcf77afd1386f89a3a406fa4a2ccb17b91d2..1fef15c4bb0516a4092d82ba9e85449105c585ea 100644 --- a/AK/StdLibExtraDetails.h +++ b/AK/StdLibExtraDetails.h @@ -522,9 +522,6 @@ inline constexpr bool IsTrivial = __is_trivial(T); template inline constexpr bool IsTriviallyCopyable = __is_trivially_copyable(T); -template -inline constexpr bool IsCallableWithArguments = requires(T t) { t(declval()...); }; - template inline constexpr bool IsConstructible = requires { ::new T(declval()...); }; @@ -635,7 +632,6 @@ using AK::Detail::IntegerSequence; using AK::Detail::IsArithmetic; using AK::Detail::IsAssignable; using AK::Detail::IsBaseOf; -using AK::Detail::IsCallableWithArguments; using AK::Detail::IsClass; using AK::Detail::IsConst; using AK::Detail::IsConstructible;