About the reference collapsing, its rule is defined as the following:
>If a typedef-name ([dcl.typedef], [temp.param]) or a decltype-specifier denotes a type TR that is a reference to a type T, an attempt to create the type “lvalue reference to cv TR” creates the type “lvalue reference to T”, while an attempt to create the type “rvalue reference to cv TR” creates the type TR.
However, consider such a case:
we know the deduced template argument are `int&` and `char&`. That is, the function type is void(int&,char&). we know the reference collapsing rules is applying for this case. However, I have to say that the identifier `T` is neither a typedef-name nor decltype-specifier, because of the following rule:
A type-parameter whose identifier does not follow an ellipsis defines its identifier to be a typedef-name (if declared without template) or template-name (if declared with template) in the scope of the template declaration.
So, these rules are contradicting with each others. How to interpret this? Is it a defect in the standard?