https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64814
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- The current behaviour is decades old, coming from the copy_n in the SGI STL, and like the standard https://www.sgi.com/tech/stl/copy_n.html says nothing about postconditions for the input iterator. Note http://cplusplus.github.io/LWG/lwg-active.html#2242 though.