diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2021-09-24 13:56:33 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2021-09-28 20:22:51 +0100 |
commit | afffc96a5259ba4e3f3cca154dc5ea32a496875e (patch) | |
tree | cbced4b89016672b840a05dbc918aab7d1eb7575 /gcc/gimplify.c | |
parent | 5f1db7627f6eea2050c3d71f17bca5ecf586a813 (diff) | |
download | gcc-afffc96a5259ba4e3f3cca154dc5ea32a496875e.zip gcc-afffc96a5259ba4e3f3cca154dc5ea32a496875e.tar.gz gcc-afffc96a5259ba4e3f3cca154dc5ea32a496875e.tar.bz2 |
libstdc++: Fix concept checks for iterators
This adds some additional checks the the C++98-style concept checks for
iterators, and removes some bogus checks for mutable iterators. Instead
of requiring that the result of dereferencing a mutable iterator is
assignable (which is a property of the value type, not required for the
iterator) check that the reference type is a non-const reference to the
value type.
Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:
* include/bits/boost_concept_check.h (_ForwardIteratorConcept)
(_BidirectionalIteratorConcept, _RandomAccessIteratorConcept):
Check result types of iterator operations.
(_Mutable_ForwardIteratorConcept): Check that iterator's
reference type is a reference to its value type.
(_Mutable_BidirectionalIteratorConcept): Do not require the
value type to be assignable.
(_Mutable_RandomAccessIteratorConcept): Likewise.
* testsuite/24_iterators/operations/prev_neg.cc: Adjust dg-error
line number.
Diffstat (limited to 'gcc/gimplify.c')
0 files changed, 0 insertions, 0 deletions