fork download
  1. #include <vector>
  2. #include <iostream>
  3.  
  4. int main() {
  5. std::vector<int> l{1, 2, 3};
  6. for(auto i:l) std::cout << i << " "; std::cout << std::endl;
  7. l = std::move(l); //
  8. for(auto i:l) std::cout << i << " "; std::cout << std::endl;
  9. }
Success #stdin #stdout 0.01s 5476KB
stdin
Standard input is empty
stdout
1 2 3