Typename is such a pain...
I recently upgraded to g++ 3.4.x and it demands proper use of "typename".
This artical describes the problem and offers a solution.
Here is some example code:
#includetemplate class bar { typedef std::vector<_foo> vect_t; vect_t::iterator itr; };
The problem is that the compiler cannot decide what vect_t::iterator is.
g++ will complain:
test1.cc:6: warning: `std::vector<_foo, std::allocator<_CharT> >::iterator' is implicitly a typename test1.cc:6: warning: implicit typename is deprecated, please see the documentation for details
To let the compiler know that vect_t::iterator is a type name and not a data member or something else you must use the typename keyword:
#includetemplate class bar { typedef std::vector<_foo> vect_t; typename vect_t::iterator itr; };