title: Return Optional value with ?: operator
body: <p>I often need to use optional type for functions:</p>
  
  <pre><code>std::optional&lt;int32_t&gt; get(const std::string&amp; field)
  {
      auto it = map.find(field);
      if (it != map.end()) return it-&gt;second;
      return {};
  }
  </code></pre>
  
  <p>Is there a way to return optional value in one line? e.g. this:</p>
  
  <pre><code>std::optional&lt;int32_t&gt; get(const std::string&amp; field)
  {
      auto it = map.find(field);
      return it != map.end() ? it-&gt;second : {};
  }
  </code></pre>
  
  <p>results in the error</p>
  
  <pre><code>error: expected primary-expression before '{' token
  return it != map.end() ? it-&gt;second : {};
                                        ^
  </code></pre>