2017-10-04 Petr Ovtchenkov <ptr@void-ptr.info>
commit0dfbafdf338cc6899d146add5161e52efb02c067
authorfdumont <fdumont@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 4 Oct 2017 16:15:18 +0000 (4 16:15 +0000)
committerfdumont <fdumont@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 4 Oct 2017 16:15:18 +0000 (4 16:15 +0000)
treedf275619e1dd28039fea465b3f33aada1130e5ce
parent629de8b3f41ce7d3eb1d8a8d7fd9e969ba9d1832
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@253417 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/streambuf_iterator.h
libstdc++-v3/testsuite/24_iterators/istreambuf_iterator/2.cc