title: Why is 'declval' specified in terms of 'add_rvalue_reference<T>::type' and not 'T&&'?
body: <p><code>§20.2.4 [declval]</code></p>
  
  <pre><code>template &lt;class T&gt;
  typename add_rvalue_reference&lt;T&gt;::type declval() noexcept; // as unevaluated operand
  </code></pre>
  
  <p>Why use <code>add_rvalue_reference</code> here?</p>
  
  <p>From <code>§20.9.7.2 [meta.trans.ref]</code> on <code>add_rvalue_reference</code>:</p>
  
  <blockquote>
    <p>If <code>T</code> names an object or function type then the member typedef <code>type</code> shall name <code>T&amp;&amp;</code>; otherwise, <code>type</code> shall name <code>T</code>. [ <em>Note:</em> This rule reflects the semantics of reference collapsing (8.3.2). For example, when a type <code>T</code> names a type <code>T1&amp;</code>, the type <code>add_rvalue_reference&lt;T&gt;::type</code> is not an rvalue reference. <em>—end note</em> ]</p>
  </blockquote>
  
  <p>Since <code>add_rvalue_reference</code> is meant to reflect reference collapsing anyways, why not just use <code>T&amp;&amp;</code> like the following?</p>
  
  <pre><code>template&lt;class T&gt;
  T&amp;&amp; declval();
  </code></pre>
  
  <p>What could go wrong? What exactly are the differences between the two versions?</p>