Here is the test code

```
template <class T> void f()
{
  T t;
  t.f<T>(0); //compiles even without the "template" keyword, what am I missing?
}

class abc
{
  public:
  template <typename T>
  void f (int){}
};

int main()
{
  f<abc>();
}

```

I am using g++ 4.4.6. Thanks

P.S: I have edited my question considerably. Please don't mind.

**EDIT** : I asked this question to EDG people and this is what Mike Herrick had to say

> 
> We do diagnose this as an error in --strict mode as well as any mode that enables dependent name lookup (e.g., --dep\_name, --parse\_templates). Dependent name lookup is disabled in GNU emulation modes, so we don't emit this error in that case.
> 
> 
> Dependent name processing requires that nonclass prototype instantiations
>  be enabled (see below). As with nonclass prototype instantiations, enabling
>  dependent name lookup is likely to cause compilation errors when compiling
>  code that was not written with the feature in mind.
> 
> 
> The dependent name lookup rules require that nondependent names be
>  looked up at the point of use in the template definition, and that
>  overload resolution be performed on nondependent calls at that point.
>  For dependent calls, the set of names considered is the set visible
>  at the point of use in the template definition plus any names made
>  visible by argument-dependent lookup at the point of instantiation.
>  Note that built-in types have no associated namespaces, so calls
>  with only built-in types can only resolve to names visible in the
>  template definition. Furthermore, names from dependent base classes
>  are not visible to unqualified lookups.
> 
> 
> 

The following illustrates some of the most common code problems encountered
when using dependent name lookup:

```
template <class T> struct B {
    void f();
  };

template <class T> struct A : public B<T> {
    X x;  // error: X not visible yet (formerly an error in strict mode)
    void g() {
      f();        // error: B<T>::f not visible
      this->f();  // must be written this way
      h(1);  // error: h(int) not visible using argument-dependent lookup
    }
  };
struct X {};
void h(int);
A<int> ai;

```