(deprecated)Namespace scope declaration of a static data member that was defined within the class with theconstexprspecifier: structS{staticconstexprintx=42;// implicitly inline, defines S::x};constexprintS::x;// declares S::x, not a redefinition ...
I don’t think this is correct behavior. As far as I understand constexpr it mainly means that ‘a’ and ‘b’ shall be usable in constant expressions. It also makes ‘a’ and ‘b’ implicitly const, but this is no conflict here since both are declared const. ...
I understand that 'x' in 'const C(x);' is not a compile-time constant, but a potentially constant expression, and this is the reason why the constructor call 'call C(x);' is illegal. I also understand the reason why the 'x' is potentially constant, the constantivity of 'x' is ...
The binding of non-const references to non-lvalues is no longer allowed. Warning LSCT550 was formerly generated in such situations. 9.4.2 Static const data members with integral or enumeration types may be initialized with a constant expression when declared in the class body. 11 Access checkin...