The code is:
class A {
public:
void f() { cout << this; }
};
int main() {
A{}; // prvalue
A{}.f(); // Is A{} in here converted to xvalue?
}
On https://en.cppreference.com/w/cpp/language/implicit_conversion, I learned the Temporary materialization rules. It tells an example:
struct S { int m; };
int i = S().m; // member access expects glvalue as of C++17;
// S() prvalue is converted to xvalue
This example applies this rule: when performing a member access on a class prvalue;
However, I'm not sure if accessing the this pointer is a special case of accessing a member.
Are there any other conversion rules that can help us determine if a prvalue to xvalue conversion is happening here