carb::cpp::invoke_result
Defined in carb/cpp/TypeTraits.h
-
template<typename Func, typename ...TArgs>
struct invoke_result : public detail::invoke_result_impl<void, Func, TArgs...> Get the result type of calling
Func
with theTArgs
pack.If
Func
is callable with the givenTArgs
pack, then this structure has a member typedef namedtype
with the return of that call. IfFunc
is not callable, then the member typedef does not exist.static_assert(std::is_same<int, typename invoke_result<int(*)(char), char>::type>::value);
This is equivalent to the C++17
std::invoke_result
meta transformation.See also