carb::cpp::is_invocable
Defined in carb/cpp/TypeTraits.h
- 
template<typename Func, typename ...TArgs>
 struct is_invocable : public detail::is_invocable_impl<void, Func, TArgs...>
- Check if the - Funcis invocable with the- TArgspack.- If - Funcis callable with the given- TArgspack, then this structure will derive from- true_type; otherwise, it will be- false_type. If- valueis- true, then- invoke(func, args...)is a valid expression.- static_assert(is_invocable<void(*)()>::value); static_assert(!is_invocable<void(*)(int)>::value); static_assert(is_invocable<void(*)(int), int>::value); static_assert(is_invocable<void(*)(long), int>::value); - This is equivalent to the C++20 - std::is_invocablemeta query. The query was added in C++17, but this additionally supports invoking a pointer to a- const&member function on an rvalue reference.