https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70530
--- Comment #4 from Askar Safin <safinaskar at mail dot ru> --- DR 2468 says that after "a = std::move (a)" state of a is unspecified. So three-move self-swap will be unspecified, too. You just said, that self-swap is not undefined, i. e. it is defined. Okey, so to make it defined we should add addressof (a) != addressof (b) check to swap