On 04/10/17 18:21 +0200, François Dumont wrote:
On 03/10/2017 16:20, Jonathan Wakely wrote:
Doesn't the modified test PASS anyway, even without changing how _M_c
is used?
No it doesn't because the first check for eof capture the 'a' char
which is never reseted so after string construction it is still
pointing to this char and is not an eof iterator. Without the _M_c
assignment the iterator is still "live" and so keeps on reflecting the
streambuf state.
Ah yes, I must have not adjusted the test properly when I tried to
check that. Your new test does indeed fail with the old
implementation.
Attached patch committed with:
Thanks.