F
Fab
Hi,
I try to compile a 2 years old project (successfully compiled with g++
3.3, if I correctly remember ).
But get problems now with g++ -> gcc 4.2.3 :
#include <list>
#include <hash_map>
template<class>
class ListPtr;
template<class T>
class ListPtrIterator {
public:
ListPtrIterator( ListPtr< T >* _user ):
M_user( _user ),
M_cur( M_user->begin() ) {}
bool
cur( T*& );
bool
reset( void ) {
M_cur =M_user->begin();
return M_cur!=M_user->end();
}
private:
ListPtr< T >* M_user;
typename list< T* >::iterator M_cur;
^^^^
ERROR: expected nested-name-specifier before 'list'
};
Please do you know what's the problem ?
Has something changed in "typename" syntax ?
Thanks,
Fabrice
I try to compile a 2 years old project (successfully compiled with g++
3.3, if I correctly remember ).
But get problems now with g++ -> gcc 4.2.3 :
#include <list>
#include <hash_map>
template<class>
class ListPtr;
template<class T>
class ListPtrIterator {
public:
ListPtrIterator( ListPtr< T >* _user ):
M_user( _user ),
M_cur( M_user->begin() ) {}
bool
cur( T*& );
bool
reset( void ) {
M_cur =M_user->begin();
return M_cur!=M_user->end();
}
private:
ListPtr< T >* M_user;
typename list< T* >::iterator M_cur;
^^^^
ERROR: expected nested-name-specifier before 'list'
};
Please do you know what's the problem ?
Has something changed in "typename" syntax ?
Thanks,
Fabrice