cmake/c++11-test-rvalue_references-N2118.cpp

changeset 473
2a84149fe642
equal deleted inserted replaced
472:8986414c6ad5 473:2a84149fe642
1 int foo(int& lvalue)
2 {
3 return 123;
4 }
5
6 int foo(int&& rvalue)
7 {
8 return 321;
9 }
10
11 int main()
12 {
13 int i = 42;
14 return ((foo(i) == 123) && (foo(42) == 321)) ? 0 : 1;
15 }

mercurial