title: Why aren't static const floats allowed?
body: <p>I have a class which is essentially just holds a bunch of constant definitions used through my application. For some reason though, <code>long</code>s compile but <code>float</code>s do not:</p>
  
  <pre><code>class MY_CONSTS
  {
  public :
      static const long   LONG_CONST = 1;      // Compiles 
      static const float FLOAT_CONST = 0.001f; // C2864
  };
  </code></pre>
  
  <p>Gives the following error:</p>
  
  <pre><code>1&gt;c:\projects\myproject\Constant_definitions.h(71) : error C2864: 'MY_CONSTS::FLOAT_CONST' : only static const integral data members can be initialized within a class
  </code></pre>
  
  <p>Am I missing something?</p>