Title says it all and both of the usual ways do not work. What am I missing?
1.
class Cl { static constexpr double PI; }; constexpr double Cl::PI = 3.14; (26): error C2737: 'private: static double const Cl::PI' : 'constexpr' object must be initialized
2.
class Cl { static constexpr double PI = 3.14; }; (26): error C2864: 'Cl::PI' : a static data member with an in-class initializer must have non-volatile const integral type
type is 'const double'
In both attempts, the error is on the same line inside the class. I am using the VisualStudio/MSVC Nov 2013 CTP compiler.
Note that making the variable const is not a solution because I want to use this constant in both constexpr functions and normal functions.
:.:.M_PIis already defined in<cmath>.