Inside the header file of my class, I am trying the following and getting compiler complaints:
private:
static const double some_double= 1.0;
How are you supposed to actually do this?
In C++11, you can have non-integral constant expressions thanks to constexpr
:
private:
static constexpr double some_double = 1.0;