[committed] libstdc++: Add default_sentinel support to stream iterators

Jonathan Wakely jwakely@redhat.com
Mon Feb 24 14:24:00 GMT 2020


On 24/02/20 13:40 +0000, Jonathan Wakely wrote:
>Missing pieces of P0896R4 "The One Ranges Proposal" for C++20.
>
>	* include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
>	Add constructor.
>	(operator==(istream_iterator, default_sentinel_t)): Add operator.
>	(ostream_iterator::difference_type): Define to ptrdiff_t for C++20.
>	* include/bits/streambuf_iterator.h
>	(istreambuf_iterator(default_sentinel_t)): Add constructor.
>	(operator==(istreambuf_iterator, default_sentinel_t)): Add operator.
>	* testsuite/24_iterators/istream_iterator/cons/sentinel.cc:
>	New test.
>	* testsuite/24_iterators/istream_iterator/sentinel.cc: New test.
>	* testsuite/24_iterators/istreambuf_iterator/cons/sentinel.cc:
>	New test.
>	* testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.

This fixes a dumb mistake in that commit.

Tested powerpc64le-linux, committed to master.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 2038 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20200224/cb5ffdd9/attachment.bin>


More information about the Gcc-patches mailing list