For the example
template <typename T>
void function(T&& arg)
Can somebody explain in detail how does it end that function signature becomes T& for lvalues and T&& for rvalues passed in ? I know that somehow(standard line needed) T -> T& in the case of lvalues and T -> T in case of revalues and then by combining & and && it results lvalue/rvalue reference.
The rule is found in section 8.3.2p6.
Or in tabular form: