[libcxx-commits] [PATCH] D127194: [libc++] Implement ranges::is_permutation

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jun 21 06:30:29 PDT 2022


philnik marked 4 inline comments as done.
philnik added inline comments.


================
Comment at: libcxx/include/__algorithm/is_permutation.h:99
+  while (__first1 != __last1 && __first2 != __last2) {
+    if (!std::__invoke(__pred, std::__invoke(__proj1, *__first1), std::__invoke(__proj2, *__first2)))
       break;
----------------
var-const wrote:
> Question: using `__invoke` slightly changes the behavior of the non-ranges version of the algorithm as well, right?
Any changes to the behaviour should be negated by the `__is_callable` check.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127194



More information about the libcxx-commits mailing list