-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed as not planned
Labels
libc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.obsoleteIssues with old (unsupported) versions of LLVMIssues with old (unsupported) versions of LLVMtest-suite
Description
[alg.copy]/16:
Preconditions: The ranges [first, last) and [result, result + (last - first)) do not overlap.
The following test do not have this precondition satisfied, as it doesn't even have [result, result + (last - first)) range:
llvm-project/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_if.pass.cpp
Lines 160 to 162 in 79210fe
| std::array<S, 4> in = {{{4, 2}, {1, 3}, {3, 4}, {3, 5}}}; | |
| std::array<S, 2> out; | |
| auto ret = std::ranges::copy_if(in.begin(), in.end(), out.begin(), [](int i) { return i == 3; }, &S::val); |
The following tests seem to be also affected by similar issue:
- std/algorithms/alg.modifying.operations/alg.remove/ranges_remove_copy.pass.cpp
- std/algorithms/alg.modifying.operations/alg.unique/unique_copy.pass.cpp
- std/algorithms/alg.modifying.operations/alg.unique/ranges_unique_copy.pass.cpp
Metadata
Metadata
Assignees
Labels
libc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.obsoleteIssues with old (unsupported) versions of LLVMIssues with old (unsupported) versions of LLVMtest-suite