#include <vector> int main() { std::vector<int> v {1, 2, 3}; for (auto&& e : v) { int&& rr = e; } }
Standard input is empty
prog.cpp: In function ‘int main()’: prog.cpp:9:18: error: cannot bind ‘int’ lvalue to ‘int&&’ int&& rr = e; ^
Standard output is empty