title: template partial specialization of static fields initialisation
body: <p>I'm attempting something like the following:</p>
  
  <pre><code>struct MyType { };
  
  template &lt;typename T&gt;
  struct Test
  {
      static const MyType * const sm_object;
  };
  
  template &lt;&gt;
  struct Test&lt;void&gt;
  {
      static const MyType * const sm_object;
  };
  
  template &lt;typename T&gt; const MyType * const Test&lt;T&gt;::sm_object = new MyType();
  template &lt;&gt; const MyType * const Test&lt;void&gt;::sm_object = new MyType();
  </code></pre>
  
  <p>I include this in 2 files - a.cpp and b.cpp. I attempt to compile and get:</p>
  
  <pre><code>error C2998: 'const MyType *Test&lt;void&gt;::sm_object' : cannot be a template definition
  </code></pre>
  
  <p>I assume my C++ syntax is bad, but I can't think what I'm doing wrong.</p>
  
  <p>I can't remove the <code>template&lt;&gt;</code> from the variable definition, as I need this in multiple translation units, and that would result in a link error.</p>
  
  <p>I could put the field into a base class and use the CRTP to create a new instance per type, and then the specialization wouldn't get in the way, but why doesn't this 'direct' field initialisation work? I must be missing some piece of syntax.</p>
  
  <p>I'm using VS2003 :(</p>