https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70513
--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> --- All right, I've got it now: we need to catch the extra qualification, similarly as in struct T { struct U; struct T::U {}; }; I've got a patch.