diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2025-05-20 13:18:52 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2025-05-27 12:15:41 +0100 |
commit | c204037dad82ffa1a131d904e0767da9f793dab7 (patch) | |
tree | b33b9a3bbc1e5d67bbd422b22ddd333e04488fe6 | |
parent | ae1c59c8de43a2cae494ce2212f44be08a629216 (diff) | |
download | gcc-c204037dad82ffa1a131d904e0767da9f793dab7.zip gcc-c204037dad82ffa1a131d904e0767da9f793dab7.tar.gz gcc-c204037dad82ffa1a131d904e0767da9f793dab7.tar.bz2 |
libstdc++: Fix PSTL test iterators
These were fixed upstream by:
https://github.com/uxlfoundation/oneDPL/pull/534
https://github.com/uxlfoundation/oneDPL/pull/546
libstdc++-v3/ChangeLog:
* testsuite/util/pstl/test_utils.h (ForwardIterator::operator++):
Fix return type.
(BidirectionalIterator::operator++): Likewise.
(BidirectionalIterator::operator--): Likewise.
(cherry picked from commit c0a2526f099dfa52df5daa1432ff583ae6af0d5f)
-rw-r--r-- | libstdc++-v3/testsuite/util/pstl/test_utils.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libstdc++-v3/testsuite/util/pstl/test_utils.h b/libstdc++-v3/testsuite/util/pstl/test_utils.h index 55b5100..9c61a714 100644 --- a/libstdc++-v3/testsuite/util/pstl/test_utils.h +++ b/libstdc++-v3/testsuite/util/pstl/test_utils.h @@ -154,7 +154,7 @@ class ForwardIterator explicit ForwardIterator(Iterator i) : my_iterator(i) {} reference operator*() const { return *my_iterator; } Iterator operator->() const { return my_iterator; } - ForwardIterator + ForwardIterator& operator++() { ++my_iterator; @@ -194,13 +194,13 @@ class BidirectionalIterator : public ForwardIterator<Iterator, IteratorTag> explicit BidirectionalIterator(Iterator i) : base_type(i) {} BidirectionalIterator(const base_type& i) : base_type(i.iterator()) {} - BidirectionalIterator + BidirectionalIterator& operator++() { ++base_type::my_iterator; return *this; } - BidirectionalIterator + BidirectionalIterator& operator--() { --base_type::my_iterator; |