title: error: need ‘typename’ before ‘A<T*>::obj’ because ‘A<T*>’ is a dependent scope
body: <p>Suppose I have a class named A</p>
  
  <pre><code>template&lt;class T&gt;
  class A
  {
  protected:
      static T* obj;
  
      A() {}
      ~A() {}
  
  public:
      // methods...
  };
  
  
  // Somewhere in my source file...
  template &lt;class T&gt; A &lt;T*&gt; ::obj = NULL;
  </code></pre>
  
  <p>For various reasons I need to declare a static member obj and gcc doesn't like them being initialized during the definition of the class (apparently you can do that with visual studio)</p>
  
  <p>Anyway, how do I correctly declare obj?</p>