On 03/16/2011 10:43 PM, Gabriel Dos Reis wrote:
The real problem is that the data member of the object is not initialized.
Fully constructed subobjects in constexpr constructor are still
be potential constant expressions.
For example, we should not reject
struct S {
int i;
int j;
constexpr S(int a) : i(a), j(i*i) { }
};
I thought about that, but it seems to me that the implementation
complexity for supporting that usage would be much higher than it is
worth. Nowhere else in constant expression evaluation do we have to
deal with assigning a value at one point and then getting it back later.
Jason