This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/21200] New: parser fails in the instantiation of a static member of template class.
- From: "iguchi at coral dot t dot u-tokyo dot ac dot jp" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Apr 2005 04:05:50 -0000
- Subject: [Bug c++/21200] New: parser fails in the instantiation of a static member of template class.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Compiler issues error as follows in compiling the attached code.
example.cpp:7: error: too few template-parameter-lists
I think the number of template parameter is correct.
So, this code should be compiled with no errors.
Actually, gcc 3.2 can compile this.
The version of gcc I use is
gcc4 (GCC) 4.0.0 20041019 (Red Hat 4.0.0-0.8)
--example.cpp--
template <class T>
class A{
public:
static T m_stat;
};
int A<int>::m_stat=0;
int main(){}
--
Summary: parser fails in the instantiation of a static member of
template class.
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: iguchi at coral dot t dot u-tokyo dot ac dot jp
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21200