title: Overload resolution between object, rvalue reference, const reference
body: <p>Given all three functions, this call is ambiguous.</p>
  
  <pre><code>int f( int );
  int f( int &amp;&amp; );
  int f( int const &amp; );
  
  int q = f( 3 );
  </code></pre>
  
  <p>Removing <code>f( int )</code> causes both Clang and GCC to prefer the rvalue reference over the lvalue reference. But instead removing either reference overload results in ambiguity with <code>f( int )</code>.</p>
  
  <p>Overload resolution is usually done in terms of a strict partial ordering, but <code>int</code> seems to be equivalent to two things which are not equivalent to each other. What are the rules here? I seem to recall a defect report about this.</p>
  
  <p>Is there any chance <code>int &amp;&amp;</code> may be preferred over <code>int</code> in a future standard? The reference must bind to an initializer, whereas the object type is not so constrained. So overloading between <code>T</code> and <code>T &amp;&amp;</code> could effectively mean "use the existing object if I've been given ownership, otherwise make a copy." (This is similar to pure pass-by-value, but saves the overhead of moving.) As these compilers currently work, this must be done by overloading <code>T const &amp;</code> and <code>T &amp;&amp;</code>, and explicitly copying. But I'm not even sure even that is strictly standard.</p>