title: Template member function partial instantiation compilation error
body: <p>I get the following error during compilation with MSVC. The main idea is to specialize function bar per size of the type. How this can be resolved? I prefer solution with templates not switch(sizeof(T))</p>
  
  <pre><code>struct S
  {
  
      template&lt;typename T&gt;
      void foo(T t)
      {
          bar&lt;sizeof(T), T&gt;();
      }
  
      template&lt;int Size, typename T&gt;
      void bar(T t)
      {
  
      }
  
      template&lt;typename T&gt;  // : error C2768: 'S::bar' : illegal use of explicit template arguments
      void bar&lt;1, T&gt;()
      {
  
      }
  
  };
  </code></pre>
  
  <p>Fully specialized template works</p>
  
  <pre><code> struct S
  {
  
      template&lt;typename T&gt;
      void foo(T t)
      {
          bar&lt;sizeof(T)&gt;();
      }
  
      template&lt;int Size&gt;
      void bar()
      {
  
      }
  
      template&lt;&gt;  // Works !!!
      void bar&lt;1&gt;()
      {
  
      }
  
  };
  </code></pre>