is_invocable_r#
Fully qualified name: carb::cpp::is_invocable_r
Defined in carb/cpp/TypeTraits.h
-
template<typename R, typename Func, typename ...TArgs>
struct is_invocable_r : public detail::invocable_r_impl::invocable_t# Check if invoking
Funcwith theTArgspack will returnR.Similar to is_invocable, but additionally checks that the result type is convertible to
Rand that the conversion does not bind a reference to a temporary object. IfRisvoid, the result can be any type (as any type can be converted tovoidby discarding it). Ifvalueistrue, theninvoke_r<R>(func, args...)is a valid expression.This is equivalent to the C++23 definition of
is_invocable_r. The function was originally added in C++17, but the specification was altered in C++23 to avoid undefined behavior.