llvm-project
410a2a23 - [libc++][pstl] Default implementation of parallel std::reverse_copy (#208085)

Commit
1 day ago
[libc++][pstl] Default implementation of parallel std::reverse_copy (#208085) This PR adds a default parallel implementation of `std::reverse_copy` based on `std::reverse_iterator` + parallel `std::copy`. Effectively it's a one-liner: ```c++ return _Copy()(__policy, std::reverse_iterator<_BidirectionalIterator>(std::move(__last)), std::reverse_iterator<_BidirectionalIterator>(std::move(__first)), std::move(__result)); ``` Included tests check that: - Semantics of the function is correct. - The function correctly SFINAE out when the first argument is not an execution policy. - The `nodiscard` policy is followed. - The `noexcept` policy is followed. - `static_assert` verifies iterators' categories (bidirectional and forward). Part of #99938. --------- Co-authored-by: Louis Dionne <ldionne.2@gmail.com>
Author
Parents
Loading