title: Template specialization with compile time constant
body: <p>I am trying to build a specialization for a template class with a compile time constant.</p>
  
  <p>The template class looks like this:</p>
  
  <pre><code>template&lt;class TNativeItem, class TComItem = void,
           VARTYPE _vartype = _ATL_AutomationType&lt;TComItem&gt;::type&gt;
  class InOutComArray
  {
  private:
      CComSafeArray&lt;TComItem, _vartype&gt; _safeArray;
      // ...
  public:
      InOutComArray(
          TNativeItem* items, size_t length,
          std::function&lt;TComItem(const TNativeItem&amp;)&gt; convertToCom,
          std::function&lt;TNativeItem(const TComItem&amp;)&gt; convertFromCom)
          : _safeArray(length)
      {
          // ...
      }
  
      // ...
  };
  </code></pre>
  
  <p>Usage would be for example:</p>
  
  <pre><code>InOutComArray&lt;BOOL, VARIANT_BOOL, VT_BOOL&gt;(
      items, length, BOOLToVARIANT_BOOL, VARIANT_BOOLToBOOL));
  </code></pre>
  
  <p>However, there also exist types that don't require conversion and I wanted to provide a short hand version for this:</p>
  
  <pre><code>InOutComArray&lt;LONG&gt;(items, length);
  </code></pre>
  
  <p>I tried to implement it like this:</p>
  
  <pre><code>template&lt;class TItem, VARTYPE _vartype = _ATL_AutomationType&lt;TItem&gt;::type&gt;
  class InOutComArray&lt;TItem, void, _vartype&gt;
      : public InOutComArray&lt;TItem, TItem, _vartype&gt;
  {
  public:
      InOutComArray(TItem* items, size_t length)
          : InOutComArray&lt;TItem, TItem, _vartype&gt;(
                items, length, NoConverter&lt;TItem&gt;, NoConverter&lt;TItem&gt;)
      {
  
      }
  };
  </code></pre>
  
  <p>However, I get the following error:</p>
  
  <blockquote>
    <p>'_vartype' : default template arguments not allowed on a partial specialization</p>
  </blockquote>
  
  <p>Is there any way around that?</p>