title: Trailing const& or && on function declaration
body: <p>I was looking at the API for <code>std::optional&lt;T&gt;</code> on <a href="http://en.cppreference.com/w/cpp/utility/optional/value_or" rel="noreferrer">cppreference</a>. I was curious how <code>value_or</code> would work. Looking there, it seems there are two overloads:</p>
  
  <pre><code>template&lt; class U &gt; 
  constexpr T value_or( U&amp;&amp; value ) const&amp;;
  
  template&lt; class U &gt; 
  T value_or( U&amp;&amp; value ) &amp;&amp;;
  </code></pre>
  
  <p>What are the <code>const&amp;</code> and <code>&amp;&amp;</code> trailing the function declaration? What is the difference between declaring a function as <code>const</code> and declaring it as <code>const&amp;</code>?</p>