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

Reply via email to