"this" in member variable initializer
Closed this issue · 1 comments
GorNishanov commented
struct X{
int x;
int y = this->x;
};
Normally, in a member function, this is an Id_expr resolved to implicit function parameter "this".
Would in the case above, "this" will be an Id_expr("this") without resolution?
GabrielDosReis commented
Yes, the this
here in a default member initializer has meaning only in the context of the constructor that uses it.