title: retrieving an object from boost::optional
body: <p>Suppose a method returns something like this</p>
  
  <pre><code>boost::optional&lt;SomeClass&gt; SomeMethod()
  {...}
  </code></pre>
  
  <p>Now suppose I have something like this</p>
  
  <pre><code>boost::optional&lt;SomeClass&gt; val = SomeMethod();
  </code></pre>
  
  <p>Now my question is how can I extract SomeClass out of val ?</p>
  
  <p>So that I could do something like this:</p>
  
  <pre><code>SomeClass sc = val ?
  </code></pre>