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.