#include <stdlib.h>
#include <stdio.h>
class Foo
{
public:
void echo() & { printf("lvalue call\n");}
void echo() && { printf("rvalue call\n");}
};
int main(int argc, char* argv[])
{
Foo f;
f.echo();
printf("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n");
Foo().echo();
return 0;
}
http://cpp.sh/563t5
--
FROM 171.83.9.*