Consider how the compiler resolves this dependent name. What does the `template` disambiguator on the marked line tell the parser?template <class T> void g(T t) { t.template foo<int>(); // <-- here }