Topic: Nested class question
Author: jedwards@ms.uky.edu (Jonathan Edwards)
Date: 21 Nov 1993 12:52:00 -0500 Raw View
Using g++ 2.3 on the following
class X {
public:
int X1;
static struct y {
const int Y1;
inline y(): Y1(-1) {}
inline z(X& anX) {anX.X1 = 5;}
} Y;
};
I get the message "assignment to non-static member X1 of enclosing
class X" (referring to the statement in X::y::z).
1) Is this a warning or an error?
2) Is this a legitimate message? The ARM (sec. 9.7) seems to imply
that what I'm doing is fine...
e-mail appreciated as I don't follow this group.