The code is as following:
struct A
{
static int k;
int i;
};
int A::k = 10;
A func() { A a; return a; }
My question is, how can I tell whether func().k
or func().i
is an lvalue or not? If both are lvalues/rvalues, how can I test them?
func().k = 0; // compile ok under g++-4.4 and g++-4.6
func().i = 1; // compile ok with g++-4.4, but g++-4.4 gives an error:
//"using temporary as lvalue [-fpermissive]"