[Bug libstdc++/64814] std::copy_n advances InputIterator one *less* time than necessary.
alex-j-a at hotmail dot co.uk
gcc-bugzilla@gcc.gnu.org
Tue Jan 27 16:09:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64814
--- Comment #2 from Anquietas <alex-j-a at hotmail dot co.uk> ---
(In reply to Jonathan Wakely from comment #1)
> The problem is that increments to the input iterator happen inside
> the copy_n call, to a copy of the iterator not to readIter itself.
The copy_n implementation I provided produces the same behaviour as the for
loop, even with copying the iterator.
More information about the Gcc-bugs
mailing list