Talk:cpp/algorithm/copy n


[edit] The InputIterator bug

Should we use the naive equivalent code for std::copy_n (the one I just posted), which is used by most existing implementations and which fails when used with single-pass InputIterators such as std::istream_iterator, or should we use the not-so-readable but bug-free version from this libc++ patch? --Cubbi 20:27, 17 August 2011 (PDT)

Better use the bug-free version. The equivalent function is there to show what actually the function does, especially in corner cases which sometimes are not be clearly described in the text (yet).P12 01:07, 18 August 2011 (PDT)
Done. Hmm, I wonder if this was filed as a GCC bug yet. --Cubbi 07:37, 18 August 2011 (PDT)
Now fixed in GCC --Cubbi 09:42, 18 August 2011 (PDT)