Compiler Error C2902

'%$L' : unexpected token following 'template', identifier expected

An identifier is expected to follow the keyword template, but something else is seen instead. For example:

namespace N {
   template<class T> class X {};
   class Y {};
}
void f() {
   N::template X<int> x1; // legal
}
void g() {
   N::template + 1; // this generates error C2902
}