[libcxx-commits] [PATCH] D114624: [pstl] Fix incorrect usage of std::invoke_result
Ruslan Arutyunyan via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Nov 26 06:32:07 PST 2021
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf824bb0e36fc: [pstl] Fix incorrect usage of std::invoke_result (authored by rarutyun).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114624/new/
https://reviews.llvm.org/D114624
Files:
pstl/include/pstl/internal/utils.h
Index: pstl/include/pstl/internal/utils.h
===================================================================
--- pstl/include/pstl/internal/utils.h
+++ pstl/include/pstl/internal/utils.h
@@ -63,15 +63,15 @@
}
template <typename _F1, typename _F2>
-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 _F1, typename _F2>
-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();
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114624.390040.patch
Type: text/x-patch
Size: 679 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211126/5bdcf953/attachment.bin>
More information about the libcxx-commits
mailing list