prog.cpp: In function ‘int main()’:
prog.cpp:9:18: error: cannot bind non-const lvalue reference of type ‘int&’ to an rvalue of type ‘std::remove_reference<int&>::type’ {aka ‘int’}
foo(std::move(i));
~~~~~~~~~^~~
prog.cpp:4:6: note: initializing argument 1 of ‘void foo(T&) [with T = int]’
void foo(T& x)
^~~
prog.cpp:11:23: error: cannot bind non-const lvalue reference of type ‘int&’ to an rvalue of type ‘std::remove_reference<int&>::type’ {aka ‘int’}
int& y = std::move(i);
~~~~~~~~~^~~