2017-10-04 Petr Ovtchenkov <ptr@void-ptr.info>
authorPetr Ovtchenkov <ptr@void-ptr.info>
Wed, 4 Oct 2017 16:15:18 +0000 (16:15 +0000)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Wed, 4 Oct 2017 16:15:18 +0000 (16:15 +0000)
commit4e91452412294f3cc1c63de8c35e88d2c08fe6ee
treedf275619e1dd28039fea465b3f33aada1130e5ce
parent6411847fcf9941ef7312911378839cc8f45e8d9a
2017-10-04  Petr Ovtchenkov  <ptr@void-ptr.info>
    François Dumont  <fdumont@gcc.gnu.org>

* include/bits/streambuf_iterator.h
(istreambuf_iterator<>::operator*()): Do not capture iterator state
in Debug assertion.
(istreambuf_iterator<>::operator++()): Likewise and remove _M_sbuf check.
(istreambuf_iterator<>::operator++(int)): Likewise.
(istreambuf_iterator<>::_M_get()): Remove _M_c assignment.
(istreambuf_iterator<>::_S_is_eof()): New.
(istreambuf_iterator<>::_M_at_eof()): Adapt, use latter.
(find(istreambuf_iterator<>, istreambuf_iterator<>, _CharT)):
Return an iterator with _M_c set to eof to capture streambuf state
on evaluation.
(testsuite/24_iterators/istreambuf_iterator/2.cc): Add checks.

Co-Authored-By: François Dumont <fdumont@gcc.gnu.org>
From-SVN: r253417
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/streambuf_iterator.h
libstdc++-v3/testsuite/24_iterators/istreambuf_iterator/2.cc