title: C++ : compile time assert the value of a floating point number
body: <p>I am using C++ 11.
  I have a floating point number.</p>
  
  <pre><code>float some_float = 3.0;
  </code></pre>
  
  <p>Now I want to compile time check that this number is greater than some value. Say that I want to compile time assert that <code>some_float</code> is greater than <code>1.0</code>. i am trying this:</p>
  
  <pre><code>static_assert(some_float &gt; 1.0);
  </code></pre>
  
  <p>But, it errors out complaining,</p>
  
  <pre><code>error: static_assert expression is not an integral constant expression
  static_assert(some_float &gt; 1.0);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  </code></pre>
  
  <p><strong>Question:</strong><br>
  what is wrong that I am doing?<br>
  How can I assert at compile time that <code>some_float</code> is set to something above <code>1.0</code>?</p>