| 16.2.8 The |
class Foo { public: typedef int map_t; }; void func () { Foo::map_t m; } |
Here, map_t is a type defined in class Foo . However, if func happened to be a function template, the class which contains the map_t type may be a template parameter. In this case, the compiler simply needs to be guided by qualifying T::map_t as a type name :
class Foo { public: typedef int map_t; }; template <typename T> void func () { typename T::map_t t; } |