Sorry, brainfart, I was wrong.
My mental model broke down when I considered cv-qualified types.
// Robin
On Sun, 13 Apr 2025, 17:22 Jonathan Wakely, <cxx@kayari.org> wrote:On Sun, 13 Apr 2025, 16:46 Robin Savonen Söderholm via Std-Proposals, <std-proposals@lists.isocpp.org> wrote:But '&&' does not mean 'forwarding reference'. It means 'rvalue reference'. It's just that an rvalue reference of an lvalue reference is an lvalue reference.
That's not really true. It does have special magic rules in the context of a deduced template parameter. It's not just reference collapsing.To expand on this, you cannot generally bind an rvalue reference to an lvalue:X x;X&& r = x; // ill-formedBut you can with a T&& function parameter when T is a deduced type:template<typename T> void f(T&&);f(x);Or simply:auto&& r = x;If the && in these deduction cases was just an rvalue reference then they wouldn't work. It requires a special language rule that deduces either an lvalue or rvalue type. So there really is a special thing that we call a forwarding reference, which is a reference to a deduced type.