By default, if it Tis a template parameter, as in your example, it is assumed that it T::some_memberdoes not indicate a type. You must explicitly state what it is, prefix it with typename:
typename T::const_iterator myIterator;
This fixes some parsing issues, as in the following example.
T::const_iterator * myIterator;
, typename, , , . .