32 typename ResultType<std::invoke_result_t<F, Args...>>::Type {
33 using ReturnType = std::invoke_result_t<F, Args...>;
35 if constexpr (std::is_void_v<ReturnType>) {
36 std::invoke(std::forward<F>(func), std::forward<Args>(
args)...);
39 return std::invoke(std::forward<F>(func), std::forward<Args>(
args)...);
auto tryInvoke(F &&func, Args &&... args) noexcept -> typename ResultType< std::invoke_result_t< F, Args... > >::Type
Invoke a function and capture its Result (value or status code).