title: Template parameters not used in partial specialization
body: <p>I have the following code:</p>
  
  <pre><code>template&lt;typename T, typename Allocator = std::allocator&lt;T&gt; &gt;
  class Carray {
      // ...
      typedef T* pointer;
      typedef pointer iterator;
      // ...
  };
  </code></pre>
  
  <p>Now I'm trying to do partial specialization for <code>iterator_traits</code>. It seems OK to me, but g++ 4.4.5 complains:</p>
  
  <pre><code>#include &lt;iterator&gt;
  
  namespace std {
      template&lt;typename T, typename Allocator&gt;
      struct iterator_traits&lt;typename Carray&lt;T, Allocator&gt;::iterator&gt; { // line 128
          typedef T value_type;
          typedef typename Allocator::difference_type difference_type;
          typedef typename Allocator::reference reference;
          typedef typename Allocator::pointer pointer;
          typedef typename std::random_access_iterator_tag iterator_category;
      };
  }
  </code></pre>
  
  <p>This is the full error message:</p>
  
  <pre><code>carray.h:128: error: template parameters not used in partial specialization:
  carray.h:128: error:         ‘T’
  carray.h:130: error: ‘Allocator’ has not been declared
  carray.h:131: error: ‘Allocator’ has not been declared
  carray.h:132: error: ‘Allocator’ has not been declared
  </code></pre>