invoke_result#
Fully qualified name: 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
Funcwith theTArgspack.If
Funcis callable with the givenTArgspack, then this structure has a member typedef namedtypewith the return of that call. IfFuncis 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_resultmeta transformation.See also