title: xvalue and const reference after method declaration
body: <p>I found the following code on STL's implementation for optional (<code>experimental/optional</code>):</p>
  
  <pre><code>template &lt;class _Up&gt;
  _LIBCPP_INLINE_VISIBILITY
  constexpr value_type value_or(_Up&amp;&amp; __v) const&amp;
  {
      static_assert(is_copy_constructible&lt;value_type&gt;::value,
                    "optional&lt;T&gt;::value_or: T must be copy constructible");
      static_assert(is_convertible&lt;_Up, value_type&gt;::value,
                    "optional&lt;T&gt;::value_or: U must be convertible to T");
      return this-&gt;__engaged_ ? this-&gt;__val_ :
                                static_cast&lt;value_type&gt;(_VSTD::forward&lt;_Up&gt;(__v));
  }
  
  template &lt;class _Up&gt;
  _LIBCPP_INLINE_VISIBILITY
  value_type value_or(_Up&amp;&amp; __v) &amp;&amp;
  {
      static_assert(is_move_constructible&lt;value_type&gt;::value,
                    "optional&lt;T&gt;::value_or: T must be move constructible");
      static_assert(is_convertible&lt;_Up, value_type&gt;::value,
                    "optional&lt;T&gt;::value_or: U must be convertible to T");
      return this-&gt;__engaged_ ? _VSTD::move(this-&gt;__val_) :
                                static_cast&lt;value_type&gt;(_VSTD::forward&lt;_Up&gt;(__v));
  }
  </code></pre>
  
  <p>Specifically, notice how <code>const&amp;</code> and <code>&amp;&amp;</code> <em>follow</em> the method specifications. I don't think I've ever seen those applied this way, so what do they mean?</p>