fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int&& test(int&& x) {
  5. x++;
  6. return std::move(x);
  7. }
  8.  
  9. int main() {
  10. const int& val = test(1);
  11.  
  12. std::cout << val;
  13.  
  14. return 0;
  15. }
Success #stdin #stdout 0s 4524KB
stdin
Standard input is empty
stdout
Standard output is empty