title: c++ template double std::complex<double> norm and product
body: <p>i wrote a template class that should work for double and std::complex. as it is suppose to be, all my methods are in the .hpp file. all but one. i had to specialize a method because at some place i have to compute the square of a double or the norm of a std::complex. more explicitly for the "double specialization" (A):</p>
  
  <pre><code>double a(2.0);
  double b(0.0);
  b = a*a;
  </code></pre>
  
  <p>for the "complex specialization" (B):</p>
  
  <pre><code>std::complex&lt;double&gt; a(2.0,3.0);
  double b(0.0);
  b = std::norm(a);
  </code></pre>
  
  <p>my questions are : </p>
  
  <ul>
  <li><p>is there a way to avoid theses specializations by using a function that works for both double and complex ? (because the std::norm works only for complex...) </p></li>
  <li><p>or the only solution is to cast the double a of the specialization (A) into a complex and then use only the specialization (B) as a general template (working for both double and complex)?</p></li>
  </ul>