template
void F(T&& x) {}
If we call it with argument of type int& everything is clear - reference collapsing takes pla
Since C++17, there is the concept of forwarding reference in the C++ standard. Normaly the template parameter is deduced as a non reference. But for the specific case of a forwarding reference if the corresponding argument is a lvalue, the parameter is deduced as a reference. C++ standard (N4700)[temp.over.deduct.call]/3:
[...]A forwarding reference is an rvalue reference to a cv-unqualified template parameter that does not represent a template parameter of a class template (during class template argument deduction ([over.match.class.deduct])). If P is a forwarding reference and the argument is an lvalue, the type “lvalue reference to A” is used in place of A for type deduction.[...]
For the concern of function call, it has the same meaning as this equivalent paragraph in the C++11(N337) and C++14(N414) [temp.over.deduct.call]/3:
[...]If P is an rvalue reference to a cv-unqualified template parameter and the argument is an lvalue, the type “lvalue reference to A” is used in place of A for type deduction[...]