title: C++ Template specialization to provide extra member function?
body: <p>how do I provide extra member function for specialized template in a non-inline way?
  i.e.</p>
  
  <pre><code>template&lt;typename T&gt;
  class sets
  {
      void insert(const int&amp; key, const T&amp; val);
  };
  template&lt;&gt;
  class sets&lt;bool&gt;
  {
      void insert(const int&amp; key, const bool&amp; val);
      void insert(const int&amp; key){ insert(key, true); };
  };
  </code></pre>
  
  <p>But when I write <code>sets&lt;bool&gt;::insert(const int&amp; key)</code> as</p>
  
  <pre><code>template&lt;&gt;
  class sets&lt;bool&gt;
  {
      void insert(const int&amp; key, const bool&amp; val);
      void insert(const int&amp; key);
  };
  template&lt;&gt;
  void sets&lt;bool&gt;::insert(const int&amp; key)
  {
      insert(key, true);
  }
  </code></pre>
  
  <p>GCC complains:</p>
  
  <blockquote>
    <p>template-id ‘insert&lt;>’ for ‘void
    ip_set::insert(const int&amp;)’ does
    not match any template declaration</p>
  </blockquote>