diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2020-06-01 18:30:47 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2020-06-01 18:30:47 +0100 |
commit | 118158b646d402b0fb5d760e4827611b731fe6f3 (patch) | |
tree | 07b8f3cbd2c5b69da2987547c43a96e3b751ef51 /libgcc | |
parent | 1746d5f3e67703a5b6a3a4fd8ca625672c321313 (diff) | |
download | gcc-118158b646d402b0fb5d760e4827611b731fe6f3.zip gcc-118158b646d402b0fb5d760e4827611b731fe6f3.tar.gz gcc-118158b646d402b0fb5d760e4827611b731fe6f3.tar.bz2 |
libstdc++: Fix __gnu_test::input_iterator_wrapper::operator++(int)
I noticed recently that our input_iterator_wrapper utility for writing
tests has the following post-increment operator:
void
operator++(int)
{
++*this;
}
That fails to meet the Cpp17InputIterator requirement that *r++ is
valid. This change makes it return a non-void proxy type that can be
deferenced to produce another proxy, which is convertible to the
value_type. The second proxy converts to const T& to ensure it can't be
written to.
* testsuite/util/testsuite_iterators.h:
(input_iterator_wrapper::operator++(int)): Return proxy object.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions