title: C++ and C++11 class static member, double should use "constexpr" while int can be "const", why?
body: <p>A structure C defined several static const members like this:</p>
  
  <p>Code is like below:</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  struct C{
      static int i;
      static const int j=1;
      static constexpr double d=1;
      static const double d1=1.0;
  };
  int main(){
      return 0;
  }
  </code></pre>
  
  <p>Compilation will lead to error:</p>
  
  <pre><code>$g++ testStatic.cpp -std=c++11
  testStatic.cpp:6:25: error: in-class initializer for static data member of
        type 'const double' requires 'constexpr' specifier
        [-Wstatic-float-init]
      static const double d1=1.0;
                          ^  ~~~
  testStatic.cpp:6:5: note: add 'constexpr'
      static const double d1=1.0;
      ^
      constexpr
  1 error generated.
  </code></pre>
  
  <p>Why so weird
  Why static int can be const，double should be constexpr，what's the rational </p>