[libcxx-commits] [PATCH] D124332: [libc++] Implement ranges::for_each{, _n}
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun May 1 06:27:49 PDT 2022
philnik marked 8 inline comments as done.
philnik added inline comments.
================
Comment at: libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/ranges.for_each.pass.cpp:57
+ int i = 0;
+ ret.fun(i);
+ assert(i == 4);
----------------
var-const wrote:
> Can you also check that it works when the functor is move-only (since the standard mandates that `for_each_result` should initialize the functor by moving)?
A functor can't be move-only. It's mandated that it's copy-constructible by `indirectly_unary_invocable`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124332/new/
https://reviews.llvm.org/D124332
More information about the libcxx-commits
mailing list