How to declare an iterator to
std::map <T, Point <T> *> ,
where:
template <typename T>
struct TList
{
typedef std::vector < std::map <T, Point <T> *> > Type;
};
In the following code
int main ()
{
....
std::map <T, Point <T> *> ::iterator i_map; //Error
...
}
g++ shows this error:
error: dependent-name ` std::map<T,Point<T>*,std::less<_Key>,std::allocator<std::pair<const T, Point<T>*> > >::iterator' is parsed as a non-type, but instantiation yields a type
note: say `typename std::map<T,Point<T>*,std::less<_Key>,std::allocator<std::pair<const T, Point<T>*> > >::iterator' if a type is meant