https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111608
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Julien Bernard from comment #0) > which seems incorrect since their have different levels of specialization. But they're not the same thing. The first one is a specialization of the member function, and defining that triggers the implicit instantiation of the enclosing class template. That uses the primary template, but it would have used the partial specialization of X<T*> if that had been seen already. I suspect this is covered by [temp.point] p7: "If two different points of instantiation give a template specialization different meanings according to the one-definition rule (6.3), the program is ill-formed, no diagnostic required."