[libcxx-commits] [PATCH] D130968: [libc++][ranges] Fix the return value of `{copy, move}_backward`.
Konstantin Varlamov via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Aug 2 00:59:08 PDT 2022
var-const created this revision.
Herald added a project: All.
var-const requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
The return value for both of these algorithms is specified as
`{last, result - N}` for the overloads in namespace `ranges`.
But the current implementation instead returns `{first, result - N}`.
Also add both algorithms to the relevant "robust" tests.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D130968
Files:
libcxx/include/__algorithm/copy_backward.h
libcxx/include/__algorithm/ranges_move_backward.h
libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_backward.pass.cpp
libcxx/test/std/algorithms/alg.modifying.operations/alg.move/ranges.move_backward.pass.cpp
libcxx/test/std/algorithms/ranges_robust_against_dangling.pass.cpp
libcxx/test/std/algorithms/ranges_robust_against_proxy_iterators.pass.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130968.449204.patch
Type: text/x-patch
Size: 12711 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220802/dd5d1c5b/attachment.bin>
More information about the libcxx-commits
mailing list