title: Why doesn't forwarding reference work in this case?
body: <pre><code>#include &lt;vector&gt;
  
  using namespace std;
  
  template&lt;typename T, typename = decltype(&amp;T::size)&gt;
  void f1(T)
  {}
  
  template&lt;typename T, typename = decltype(&amp;T::size)&gt;
  void f2(T&amp;)
  {}
  
  template&lt;typename T, typename = decltype(&amp;T::size)&gt;
  void f3(T&amp;&amp;)
  {}
  
  int main()
  {
      vector&lt;int&gt; coll;
  
      f1(coll); // ok
      f2(coll); // ok
      f3(coll); // error : no matching function for call to 'f3'
  }
  </code></pre>
  
  <blockquote>
    <p>main.cpp(21,6):  note: candidate template ignored: substitution failure [with <code>T</code> = > 
    <code>std::vector&lt;int, std::allocator&lt;int&gt; &gt; &amp;</code>]: type
    '<code>std::vector&lt;int, std::allocator&lt;int&gt; &gt; &amp;</code>' cannot be used prior to
    '<code>::</code>' because it has no members</p>
    
    <p><code>void f3(T&amp;&amp;)</code></p>
  </blockquote>
  
  <p>My compiler is clang 4.0.</p>
  
  <p>To my surprise, <code>f3(coll)</code> fails, while <code>f1(coll)</code> and <code>f2(coll)</code> are both ok.</p>
  
  <p><strong>Why does a forwarding reference not work in this case?</strong></p>