I have a class template with an iterator as a static member. Below is a simplified version of the code. I'm having trouble with the proper syntax for the definition (line 9). Can anyone help?
Compiling with g++ givesCode:#include <vector> template<typename T> class A { static typename std::vector<typename std::vector<A*>::iterator>::iterator p; }; template<typename T> typename A<T>::std::vector<std::vector<A<T>*>::iterator>::iterator p; int main() {}
foo.cpp:9: error: non-template ‘vector’ used as template
foo.cpp:9: note: use ‘typename A<T>::std::template vector’ to indicate that it is a template
foo.cpp:9: error: expected unqualified-id before ‘;’ token