https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60497
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> --- For example: #include <memory> #include <vector> struct A; template<typename T> struct B { T t; }; int main() { using UP = std::unique_ptr<B<A>>; std::vector<UP*> v; v = v; } The self-assignment test in std::vector uses &__rhs which does ADL and tries to complete A. Fixing this everywhere might take some time.