There are 11 references to the expression core constant expression
in the latest draft of the C++11 Standard (N3690), and none of them defines what this entity is.
One can also find that the expression core constant expression
is pretty well defined here , basically in the same terms that the Standard uses to define the expression conditional-expression
.
Therefore, I would like to get some input on this issue, which seems to me, to be wrong in the Standard.
Now, assuming the definition in cppreference is correct I would also like to know why the following snippet compiles in Coliru and in Ideone, despite item (10) in the alluded definition?
#include <iostream>
int main()
{
const double x = 2.;
constexpr double y = x;
std::cout << y << std::endl;
}
I'm specifically thinking in terms of the lvalue to rvalue implicit conversion
of variable x
in the expression constexpr double y = x;
, which is not covered by any of the clauses (a), (b) and (c) in item (10) referred above.
Thanks for the help.