title: Static constexpr: why does it need to be templated?
body: <p>I have two structures <code>a</code> and <code>b</code>:</p>
  
  <pre><code>struct a {
      static constexpr int f() {
          return 1;
      }
  
      static constexpr int c = f();
  };
  
  template&lt;int I&gt;
  struct b {
      static constexpr int f() {
          return I;
      }
  
      static constexpr int c = f();
  };
  </code></pre>
  
  <p><code>a</code> is obviously not working because <code>f</code> is considered to be not defined here. But why the hell <code>b</code> is valid?</p>