title: Template specialization within class definition
body: <p>I wonder whether it is possible to put the whole code of such a class inside the class (kind of as in Java). I'm doing this for some piece of code, instead of having to search for each function, I'd rather have the whole class on a single sheet of paper (yes, I do print them, I tend to like paper these days).</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  template &lt;class V&gt; class A {
  public:
      A();
  };
  
  template &lt;class V&gt; A&lt;V&gt;::A() {
      std::cout&lt;&lt;"Generic"&lt;&lt;std::endl;
  }
  
  template &lt;&gt; A&lt;bool&gt;::A() {
      std::cout&lt;&lt;"bool"&lt;&lt;std::endl;
  }
  
  int main(int argc, char** argv) {
      A&lt;int&gt; a;
      A&lt;bool&gt; b;
  }
  </code></pre>
  
  <p>Now is it possible to get something along those lines ?</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  template &lt;class V&gt; class A {
  public:
      A() {
          std::cout&lt;&lt;"Generic"&lt;&lt;std::endl;
      };
      /* somethig specifying specialization for bool */ A() {
          std::cout&lt;&lt;"bool"&lt;&lt;std::endl;
      }
  };
  
  int main(int argc, char** argv) {
      A&lt;int&gt; a;
      A&lt;bool&gt; b;
  }
  </code></pre>
  
  <p>Is this possible at all ?</p>