The below is a toy program I wrote to ask my question.
class Yo2 {
public:
Yo2() {}
void foo2() && {}
};
void tmp(Yo2&& yo2) {
yo2.foo2();
}
My compiler says
'this' argument to member function 'foo2' is an lvalue, but function has rvalue ref-qualifier
What am I missing? Why is yo2 being considered an lvalue?