In my book "The C++ Programming Language" Bjarne Stroustrup I'm read about const members init and saw the next code (i change var names and values):
class ConstMembers
{
public:
static const int a = 1; // ok
static int b = 2; // error: non const
const int c = 3; // error: no static
static const float d = 2.3; // error: not integer
};
But when i run this code in Clion 2020.1 with next cmake setting
set(CMAKE_CXX_STANDARD 11)
in third case
const int c = 3; // error: no static
i didn't get an error.
It is an error in the book or the c++11 allows such initialization?
