template <class T> class Foo
{
typedef vector<T> TVector;
...
void bar()
{
...
TVector tVector;
...
// This line causes the error.
for (TVector::iterator i = tVector.begin(); i < tVector.end(); i++)
{
...
}
...
};
And I get the following error when compiling:
1 2
AStarSearch.h:69: error: expected `;' before āiā
AStarSearch.h:69: error: āiā was not declared in this scope
I've tried it on Mac OS 10.5 with g++ 4.0 and Debian with g++ 4.3, and get the same error.
Do I need to do something special to be able to use a template iterator inside a template class? Or am I just overlooking something stupid?
Thanks.