fork download
  1. #include <iostream>
  2. #include <tuple>
  3.  
  4. int main() {
  5. int x = 1;
  6. int y = 2;
  7. int z = 3;
  8.  
  9. std::tie(y, z, x) = {x, y, z};
  10.  
  11. std::cout << x << " " << y << " " << z << std::endl;
  12. }
Success #stdin #stdout 0s 16064KB
stdin
Standard input is empty
stdout
1 1 1