title: Implicit move the value contained in std::optional when return
body: <p>Since C++11 we have move semantics. In the example below the move-constructor will be used (or copy elision), instead of the copy-constructor as in C++98, without any additional efforts.</p>
  
  <pre><code>std::string f()
  {
      std::string res;
      ...
      return res; // &lt;- move is used here instead of copy
  }
  </code></pre>
  
  <p>But what about this case?</p>
  
  <pre><code>std::string f()
  {
      std::optional&lt;std::string&gt; res;
      ...
      return *res; // &lt;-- will the std::string value be moved??
  }
  </code></pre>
  
  <p>Or one have to write something like this?</p>
  
  <pre><code>std::string f()
  {
      std::optional&lt;std::string&gt; res;
      ...
      return *std::move(res);
  }
  </code></pre>