Programming Languages, Cpp, Software Development, Coding, Optimization.
an identity and any name expression is an lvalue. Therefore, the x here is an lvalue, and it will bind to a reference. When we write int&& x = 10, we take a prvalue (the constant 10), giving it a name and a lifetime. Because of this, to the function there is no difference between int x = 10; and