public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/21200] New: parser fails in the instantiation of a static member of template class.
@ 2005-04-25 4:05 iguchi at coral dot t dot u-tokyo dot ac dot jp
2005-04-25 4:09 ` [Bug c++/21200] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: iguchi at coral dot t dot u-tokyo dot ac dot jp @ 2005-04-25 4:05 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/21200] parser fails in the instantiation of a static member of template class.
2005-04-25 4:05 [Bug c++/21200] New: parser fails in the instantiation of a static member of template class iguchi at coral dot t dot u-tokyo dot ac dot jp
@ 2005-04-25 4:09 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-25 4:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-25 04:09 -------
You want:
template<> int A<int>::m_stat=0;
*** This bug has been marked as a duplicate of 17445 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21200
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-04-25 4:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-25 4:05 [Bug c++/21200] New: parser fails in the instantiation of a static member of template class iguchi at coral dot t dot u-tokyo dot ac dot jp
2005-04-25 4:09 ` [Bug c++/21200] " pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).