while vc++6 succeeds, g++ fails. ???

My code is at:
http://rafb.net/p/E82U3C73.html
It is a concept sample. I desperately tried to compile it with g++. To my surprise (in vmplayer/ win2k) vc++6 succeeds to compile it.
I'm in very doubt. I used RedHat WS 4 , g++-3.4 and Debian Etch, g++-4.1
Comment this please!!
mihai [mihk]

On Tiger....

myList.h:12: error: type 'std::list<T, std::allocator<_CharT> >' is not derived from type 'myList<T>'
myList.h:12: error: expected ';' before 'iterator'
myList.h:13: error: type 'std::list<T, std::allocator<_CharT> >' is not derived from type 'myList<T>'
myList.h:13: error: expected ';' before 'const_iterator'
myList.h: In member function 'void myList<T>::constIt(const myList<T>&) const':
myList.h:17: error: 'const_iterator' was not declared in this scope
myList.h:17: error: expected `;' before 'cit'
myList.h: In member function 'void myList<T>::It()':
myList.h:23: error: 'iterator' was not declared in this scope
myList.h:23: error: expected `;' before 'itb'

with

powerpc-apple-darwin8-g++-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5367)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Then on Solaris 10 with Studio11

bash-3.00$ PATH=/opt/SUNWspro/bin:$PATH \
> CC=/opt/SUNWspro/bin/cc \
> CXX=/opt/SUNWspro/bin/CC \                                                   
> /opt/SUNWspro/bin/CC main.cpp -I.
"myList.h", line 12: Warning (Anachronism): Type names qualified by template parameters require "typename".
"main.cpp", line 5:     Where: While specializing "myList<T>".
"main.cpp", line 5:     Where: Specialized in non-template code.
"myList.h", line 13: Warning (Anachronism): Type names qualified by template parameters require "typename".
"main.cpp", line 5:     Where: While specializing "myList<T>".
"main.cpp", line 5:     Where: Specialized in non-template code.
2 Warning(s) detected.

Does it matter that int is not a class?

Try this:

	typedef typename std::list<T>::iterator        iterator ;
	typedef typename std::list<T>::const_iterator  const_iterator ;

That fix worked on g++-4.0.1.

Thanks for posts !! It worked out. mihk