1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
int foo(int& lvalue) { return 123; } int foo(int&& rvalue) { return 321; } int main() { int i = 42; return ((foo(i) == 123) && (foo(42) == 321)) ? 0 : 1; }