I've written the following and expected a
to be initilized with 4
rvalue. But it didn't:
struct A
{
const int a;
A() //ctor-initializer is not specified, therefore no initialization for a is performed
{
a = 4; //initialization
}
};
A a;
What's wrong? Why does compiler complain?