https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120386
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- It looks like I've rediscovered https://cplusplus.github.io/LWG/issue2439 which summarized (and fixed) the requirements that imply how this needs to work. https://cplusplus.github.io/LWG/issue241 and https://cplusplus.github.io/LWG/issue538 tried to state the requirements for std::unique_copy, but failed to notice the same-type requirement.