title: Why does this template variable lead to a compiler warning?
body: <p>Why am I getting this warning from Clang? This seems like a sensible use of a templated constant to me.</p>
  
  <p><code>warning: variable 'M_PI&lt;int&gt;' has internal linkage but is not defined [-Wundefined-internal]</code></p>
  
  <pre class="lang-c++ prettyprint-override"><code>#include &lt;iostream&gt;
  
  template &lt;typename T&gt;
  constexpr T M_PI = T(3.1415926535897932);
  
  template &lt;typename T&gt;
  constexpr T CalcCircumference(T d)
  {
      return d * M_PI&lt;T&gt;;
  }
  
  int main()
  {
      std::cout &lt;&lt; CalcCircumference(42.0f);
  }
  </code></pre>
  
  <p>Edit: Apparently a minimalistic test case is confusing to some. I have embellished it a bit to hopefully alleviate that.</p>