T
tkrogc
I compiled the source below using the comeau compiler
http://www.comeaucomputing.com/tryitout/
Why does the f funtion compile while the g function produces an lvalue
error ?
(I thought the two functions were identical except for a harmless
syntax difference)
struct A
{
void f(){}
static void g(A& a){}
};
int main()
{
A().f();
A::g(A()); // must be an lvalue
}
http://www.comeaucomputing.com/tryitout/
Why does the f funtion compile while the g function produces an lvalue
error ?
(I thought the two functions were identical except for a harmless
syntax difference)
struct A
{
void f(){}
static void g(A& a){}
};
int main()
{
A().f();
A::g(A()); // must be an lvalue
}