🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by rongli Thu, 03 Aug 1995 19:50
STL with gcc-2.6.3 problem
#1572
Author: 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	|			
---------------------------------------------------------------------
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads