diff --git a/pstl/include/pstl/internal/utils.h b/pstl/include/pstl/internal/utils.h --- a/pstl/include/pstl/internal/utils.h +++ b/pstl/include/pstl/internal/utils.h @@ -63,15 +63,15 @@ } template -typename std::invoke_result<_F1()>::type -__invoke_if_else(std::true_type, _F1 __f1, _F2) +auto +__invoke_if_else(std::true_type, _F1 __f1, _F2) -> decltype(__f1()) { return __f1(); } template -typename std::invoke_result<_F2()>::type -__invoke_if_else(std::false_type, _F1, _F2 __f2) +auto +__invoke_if_else(std::false_type, _F1, _F2 __f2) -> decltype(__f2()) { return __f2(); }