https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62227
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- A template cannot be a move constructor and so it is not legal to elide it. Removing line (1) means there is a move constructor implicitly declared, which will be used and can be elided. Removing line (2) means there is a move constructor, which will be used and elided.