🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #1572

STL with gcc-2.6.3 problem

#1572
From: rongli
Date: Thu, 03 Aug 1995 19:50
44 lines
1283 bytes
	Hi, folks.

	I am using STL with gcc-2.6.3 is compiler, and having the problem with 
the static member function definition. 
	Here is the simplified code :

--------------------------------------------

#define A b

template <class T>
class foo {
public:
    typedef A<T> foo1;
protected:
    static A<T> foo2;
};

template <class T>
foo<T>::foo1 foo<T>::foo2;    // this is line #13

---------------------------------------------

	The compiler will give the error as:

./line 13:  parse error before `<' 


	Why is parse error occurring ?  Should there be ways to work around 
this if the compiler can't handle this ?  

	Thanks.




-- 


----------------------------------------------------------------------
 Rong Li			|					 
 rongli@resdgw16.er.usgs.gov	|			
---------------------------------------------------------------------
Technical Details
Message-ID: <3vr9ar$gig@sun.cr.usgs.gov>
Path: arc1-ca.pugleaf.net!mcdgs01.cr.usgs.gov!rongli

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!mcdgs01.cr.usgs.gov!rongli
From: rongli@mcdgs01.cr.usgs.gov ()
Newsgroups: comp.std.c++
Subject: STL with gcc-2.6.3 problem
Date: 3 Aug 1995 19:50:51 GMT
Organization: U.S. Geological Survey, Mid-Continent
Sender: rongli@resdgw16.er.usgs.gov ()
Distribution: world
Message-ID: <3vr9ar$gig@sun.cr.usgs.gov>
NNTP-Posting-Host: resdgw16.er.usgs.gov
Keywords: static member definitions