http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47343
Summary: incorrect location for declaration of class template partial specialization Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: r...@gcc.gnu.org template<class T> struct X : T { void f(); }; template<class T> inline void X<T>::f() { } template<typename T> struct Y { }; template<class T> struct X< Y<T> >; // here template<class T> inline void X< Y<T> >::f() // xxx { } ps2.cc:21:16: error: invalid use of incomplete type 'struct X<Y<T> >' ps2.cc:2:10: error: declaration of 'struct X<Y<T> >' The declaration of the partial specialization is on line 17 not line 2 (related to PR 47342)