Results in error: expected ';' before 'Bar'
template <class T>
class Foo
{
public:
Foo(const T&);
std::list<T*>::iterator Bar();
};
Adding typename fixes the problem - so the gcc friendy Bar looks like this:
typename std::list<T*>::iterator Bar();As with many compiler errors the error message gave me little insight into the problem. I tracked down the solution looking through the boost libraries for code that returns an iterator.
No comments:
Post a Comment