title: Take value out of std::optional
body: <p>How do you actually take a value out of optional? Meaning take ownership of the value inside the <code>std::optional</code> and replace it with <code>std::nullopt</code> (or swap it with another value)?</p>
  <p>In Rust for example you could <code>.unwrap</code> your <code>Option</code> or do something like <code>foo.take().unwrap()</code>. I'm trying to do something like that with C++ <code>optional</code>s.</p>