fork(5) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void Func(int&& i) {
  5. ++i;
  6. }
  7.  
  8. int main() {
  9. int num = 1234;
  10. cout << "Before: " << num << endl;
  11. Func(std::move(num));
  12. cout << "After: " << num << endl;
  13. }
Success #stdin #stdout 0s 2852KB
stdin
Standard input is empty
stdout
Before: 1234
After: 1235