title: C++: error "explicit specialization in non-namespace scope"
body: <pre><code>template&lt;typename T1, typename T2&gt;
  class Bimap {
  public:
      class Data {
      private:
          template&lt;typename T&gt; Data&amp; set(T);
          template&lt;&gt; Data&amp; set&lt;T1&gt;(typename T1 v) { /*...*/ }
      };
  };
  </code></pre>
  
  <p>That gives me the error:</p>
  
  <p><code>error: explicit specialization in non-namespace scope 'class Bimap&lt;T1, T2&gt;::Data'</code></p>
  
  <p>I understand what the error is saying. But why I can't I do this? And how can I fix it?</p>