This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/47343] New: incorrect location for declaration of class template partial specialization
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 18 Jan 2011 12:59:45 +0000
- Subject: [Bug c++/47343] New: incorrect location for declaration of class template partial specialization
- Auto-submitted: auto-generated
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: unassigned@gcc.gnu.org
ReportedBy: redi@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)