fork download
  1. #include <iostream>
  2.  
  3. int main() {
  4. int x{5}, y{3}, z{2};
  5.  
  6. int temp{std::move(x)};
  7. x = y;
  8. y = z;
  9. z = temp;
  10.  
  11. std::cout << x << ' ' << y << ' ' << z << '\n';
  12.  
  13. return 0;
  14.  
  15. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
3 2 5