title: Partial template specialization for arrays
body: <p>Seached for this, but can't find a similar question. If there is one please close this question.
  This isn't my real code, just an example to demonstrate :-</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  // Normal template class with a destructor
  template &lt;class T&gt; class Test
  {
  public:
      ~Test() { std::cout &lt;&lt; "Normal \n";}
  };
  
  // Partial specialization for arrays
  template&lt;class T&gt; class Test&lt;T[]&gt;
  {
  public:
      ~Test() { std::cout &lt;&lt; "Array \n"; }
  };
  
  
  int main()
  {
      Test&lt;int[3]&gt; i;
  }
  </code></pre>
  
  <p>When I compile this it <em>does not</em> call the specialized version for arrays. If I replace the template with </p>
  
  <pre><code>template&lt;class T&gt; class Test&lt;T[3]&gt;
  {
  public:
      ~Test() { std::cout &lt;&lt; "Array \n"; }
  };
  </code></pre>
  
  <p>Then it <em>does</em> call the specialization but I want this to be called for any array not just ones of a specifed size. Is there any way to write a specialization that gets used for all arrays?</p>