template<typename T> void f(const T&& param); // “&&” means rvalue reference int main() { int x = 10; f(x); }
Standard input is empty
prog.cpp: In function 'int main()':
prog.cpp:7:5: error: cannot bind 'int' lvalue to 'const int&&'
f(x);
^
prog.cpp:2:6: note: initializing argument 1 of 'void f(const T&&) [with T = int]'
void f(const T&& param); // “&&” means rvalue reference
^
Standard output is empty