12 lines
125 B
C++
12 lines
125 B
C++
|
|
struct test{
|
|
void f() & { }
|
|
void f() && { }
|
|
};
|
|
|
|
void someFunc(){
|
|
test t;
|
|
t.f(); // lvalue
|
|
test().f(); // rvalue
|
|
}
|