[PATCH 3/4] libstdc++: Add a test range type that has a sized sentinel
Jonathan Wakely
jwakely@redhat.com
Tue Mar 3 21:37:00 GMT 2020
On 03/03/20 11:30 -0500, Patrick Palka wrote:
>This adds a test range type whose end() is a sized sentinel to
><testsuite_iterators.h>, which will be used in the tests that verify LWG 3355.
>
>libstdc++-v3/ChangeLog:
>
> * testsuite/util/testsuite_iterators.h (test_range::get_iterator): Make
> protected instead of private.
> (test_sized_range_sized_sent): New.
>---
> .../testsuite/util/testsuite_iterators.h | 32 +++++++++++++++++++
> 1 file changed, 32 insertions(+)
>
>diff --git a/libstdc++-v3/testsuite/util/testsuite_iterators.h b/libstdc++-v3/testsuite/util/testsuite_iterators.h
>index e47b2b03e40..756940ed092 100644
>--- a/libstdc++-v3/testsuite/util/testsuite_iterators.h
>+++ b/libstdc++-v3/testsuite/util/testsuite_iterators.h
>@@ -735,6 +735,7 @@ namespace __gnu_test
> { return i.ptr - s.end; }
> };
>
>+ protected:
> auto
> get_iterator(T* p)
> {
>@@ -812,6 +813,37 @@ namespace __gnu_test
> using test_output_sized_range
> = test_sized_range<T, output_iterator_wrapper>;
>
>+ // A type meeting the minimum std::sized_range requirements, and whose end()
>+ // returns a size sentinel.
s/size/sized/ here, no?
OK for master.
More information about the Libstdc++
mailing list