[libcxx-commits] [PATCH] D114624: [pstl] Fix incorrect usage of std::invoke_result

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Nov 26 06:33:24 PST 2021


Quuxplusone added a comment.

Obviously correct, :shipit:. But some non-blocking nits:
(1) If we have any tests related to PSTL, then surely it's trivial to add a regression test for this. (But I'm not sure we do.)
(2) The indentation would read better as

  template <typename _F1, typename _F2>
  auto __invoke_if_else(std::false_type, _F1, _F2 __f2)
      -> decltype(__f2())
  {

(3) It's mildly weird that `__invoke_if` and `__invoke_if_not` return `void` on both branches, but `__invoke_if_else` returns `auto` on both branches. You sure you couldn't just make the return type `void`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114624/new/

https://reviews.llvm.org/D114624



More information about the libcxx-commits mailing list