yes, do_stuff() is not static so non-static var can only be referenced within it - not as part of the definition - as the this pointer is only available within the function.
Non-static class members are not allowed in default arguments (even if they are not evaluated), except when used to form a pointer-to-member or in a member access expression.
1 2 3 4 5 6 7
int b;
class X {
int a;
int mem1(int i = a); // error: non-static member cannot be used
int mem2(int i = b); // OK: lookup finds X::b, the static member
staticint b;
};
That last part means that something like int mem1(int X::* i = &X::a); would in fact work.