https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108846
--- Comment #5 from Giuseppe D'Angelo <dangelog at gmail dot com> --- > In the case of copy family algorithms, I believe it's OK to specially handle > cases where last - first == 1. https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/include/bits/stl_algobase.h#L417-L437 Is the extent of the fix just to add another branch to the if (_Num) check here? I've just tried locally, and it seems to work. It also doesn't seem that libstdc++ uses memcpy/memmove elsewhere (e.g. in std::fill).