title: Can C++ Constructors be templates?
body: <p>I have non-template class with a templatized constructor. This code compiles for me. But i remember that somewhere i have referred that constructors cannot be templates. Can someone explain whether this is a valid usage?</p>
  
  <pre><code>typedef double Vector;
  
  //enum Method {A, B, C, D, E, F};
  struct A {};
  
  class Butcher
  {
  public:
   template &lt;class Method&gt;
   Butcher(Method);
  
  
  private:
   Vector a, b, c;
  };
  
  template &lt;&gt;
  Butcher::Butcher(struct A)
  : a(2), b(4), c(2)
  {
   // a = 0.5, 1;
   // b = -1, 1, 3, 2;
   // c = 0, 1;
  }
  </code></pre>
  
  <p>Thanks,
  Gokul.</p>