mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:17:45 +00:00
AK: Move the definition of IsCallableWithArguments
to Function.h
It will allow us to use definitions from both `StdLibExtraDetails.h` and `Concepts.h` at the same time.
This commit is contained in:
parent
e538fa203e
commit
d9f632fee7
2 changed files with 11 additions and 4 deletions
|
@ -36,6 +36,16 @@
|
|||
|
||||
namespace AK {
|
||||
|
||||
namespace Detail {
|
||||
|
||||
template<typename T, typename... Args>
|
||||
inline constexpr bool IsCallableWithArguments = requires(T t) {
|
||||
t(declval<Args>()...);
|
||||
};
|
||||
}
|
||||
|
||||
using Detail::IsCallableWithArguments;
|
||||
|
||||
template<typename>
|
||||
class Function;
|
||||
|
||||
|
@ -271,4 +281,5 @@ private:
|
|||
|
||||
#if USING_AK_GLOBALLY
|
||||
using AK::Function;
|
||||
using AK::IsCallableWithArguments;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue