This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

problem with std::list using own type


Hello, i'm new to the list.
I'm developing a multiplatform library, using both Microsoft vc2003 (on win xp) and GCC 3.3.4 (on Linux), and the following code that compiles perfectly on vc2003/2005, GCC refuses to doing it:


<-----------------code---------------------->
typedef std::list<AccessItem> AccessList;
typedef std::list<AccessItem>::iterator AccessIt;
<----------------/code---------------------->

where AccessItem is a class defined in the library.Actually, the errors tha gcc displays are:

error : ISO C++ forbids declaration of `list' with no type
error : template-id `list<AccessItem>' used as a declarator

I cannot find out what i'm doing wrong, I thought that typedef's of containers was allowed in GCC, in fact, this code worked on other compilers.... Any idea??

Thanks,

Mariano.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]