title: can a static constexpr variable be used as a template argument
body: <p>I have the following piece of code which compiles on older gcc, but not on version 6 (works with -std=c++1z). Clang rejects it too, saying the object val doesn't have the right kind of linkage. I don't understand the difference. Isn't a constexpr variable of a pointer type supposed to work more or less transparently? Is there something I'm missing in the syntax that would allow this to work? Or is this violating some portion of the standard?</p>
  
  <pre><code>typedef void(*t_voidfn)();
  template &lt;t_voidfn&gt; struct s {};
  void fn() {
    static constexpr t_voidfn val = &amp;fn;
    s&lt;val&gt; x;
  }
  </code></pre>
  
  <p>On the other hand this one works.</p>
  
  <pre><code>typedef void(*t_voidfn)();
  template &lt;t_voidfn&gt; struct s {};
  void fn() {
    s&lt;&amp;fn&gt; x;
  }
  </code></pre>