title: Why is partial specialization of a nested class template allowed, while complete isn't?
body: <pre><code>    template&lt;int x&gt; struct A {                                                                                                    
          template&lt;int y&gt; struct B {};.                                                                                             
          template&lt;int y, int unused&gt; struct C {};                                                                                  
      };                                                                                                                            
  
      template&lt;int x&gt; template&lt;&gt; 
      struct A&lt;x&gt;::B&lt;x&gt; {}; // error: enclosing class templates are not explicitly specialized
  
      template&lt;int x&gt; template&lt;int unused&gt; 
      struct A&lt;x&gt;::C&lt;x, unused&gt; {}; // ok
  </code></pre>
  
  <p>So why is the explicit specialization of a inner, nested class (or function) not allowed, if the outer class isn't specialized too? Strange enough, I can work around this behaviour if I only <em>partially</em> specialize the inner class with simply adding a dummy template parameter. Makes things uglier and more complex, but it works.</p>
  
  <p>I would consider complete specializations as a subset of partial specializations - especially because you can express every complete specialization as a partial with adding a dummy parameter. So this disambiguation between partial and full specialization doesn't really make sense for me.</p>
  
  <p>Unfortunatly nobody at comp.std.c++ dared to answer, so I am putting it up here again with a bounty.</p>
  
  <p>Note: I need this feature for recursive templates of the inner class for a set of the outer class and the specialization of the inner parameter does depend on the outer template parameter.</p>