Initializing a constexpr with a const, -- int vs float
<p>I'm wondering why the integer <code>ii</code> is initiallized at compile time, but not the float <code>ff</code> here:</p>

<pre><code>int main() {
  const int i = 1;
  constexpr int ii = i;

  const float f = 1.0;
  constexpr float ff = f;
 }
</code></pre>

<p>This is what happens when I try to compile:</p>

<pre class="lang-none prettyprint-override"><code>&gt; g++ -std=c++11 test.cc
test.cc: In function ‘int main()’:
test.cc:6:24: error: the value of ‘f’ is not usable in a constant expression
   constexpr float ff = f;
                        ^
test.cc:5:15: note: ‘f’ was not declared ‘constexpr’
   const float f = 1.0;
</code></pre>