Assume we have some code
template <typename T>
void Foo(T&& param);
int x = 5;
// deduced Foo<int&>(int&).
// Argument type A = int. T = int&.
Foo(x);
int& rx = x;
// deduced Foo<int&>(int& &&) -> Foo<int&>(int&).
// But... argument type A = int&, an lvalue reference to int.
// Is T = int& or under the hood it is T = int& &?
Foo(rx);
According to https://en.cppreference.com/w/cpp/language/template_argument_deduction
4) If P is an rvalue reference to a cv-unqualified template parameter (so-called forwarding reference), and the corresponding function call argument is an lvalue, the type lvalue reference to A is used in place of A for deduction
What I want to know: is 'reference collapsing' rules are applied to deduced type T (not to P, parameter type)?
So do we really have for 'Foo(rx)' T = int& &, which collapsed to T = int&?