fork download
  1. #include <vector>
  2.  
  3. int main()
  4. {
  5. std::vector<int> v {1, 2, 3};
  6.  
  7. for (auto&& e : v)
  8. {
  9. int&& rr = e;
  10. }
  11. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:9:18: error: cannot bind ‘int’ lvalue to ‘int&&’
       int&& rr = e;
                  ^
stdout
Standard output is empty