https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93562
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Known to work|9.2.0 |6.5.0 Target Milestone|10.0 |8.4 Summary|[10 Regression] |[8/9/10 Regression] |unique_ptr::swap requires |unique_ptr::swap |complete type |incorrectly uses generic | |std::swap Known to fail| |7.5.0, 8.3.0, 9.2.0 --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- Summary and other fields adjusted to reflect the root cause: using the generic std::swap on the __uniq_ptr_impl object performs a move-construction and move-assignments, but should only perform swaps (possibly finding a custom swap via ADL). Thanks to Billy Baker for finding this bug.