[libcxx-commits] [PATCH] D119445: [libc++] Use std::ranges::swap_ranges in swap CPO
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Feb 10 08:03:49 PST 2022
ldionne requested changes to this revision.
ldionne added inline comments.
This revision now requires changes to proceed.
================
Comment at: libcxx/include/__concepts/swappable.h:80
{
- // TODO(cjdb): replace with `ranges::swap_ranges`.
- for (size_t __i = 0; __i < _Size; ++__i) {
- (*this)(__t[__i], __u[__i]);
- }
+ _VSTD::swap_ranges(_VSTD::addressof(__t[0]), _VSTD::addressof(__t[_Size]), _VSTD::addressof(__u[0]));
}
----------------
I think this is what you want?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119445/new/
https://reviews.llvm.org/D119445
More information about the libcxx-commits
mailing list