title: Why can't I have std::optional<T> where T is abstract?
body: <p>This does not work:</p>
  
  <pre><code>struct Type {
      virtual bool func(const std::string&amp; val) const noexcept = 0;
  }
  
  // in main
  optional&lt;Type&gt; = some_function_returning_optional_type();
  </code></pre>
  
  <p>and fails with a error message:</p>
  
  <pre><code>error: cannot declare field 'std::experimental::fundamentals_v1::_Optional_base&lt;Type, false&gt;::&lt;anonymous union&gt;::_M_payload' to be of abstract type 'Type'
  </code></pre>
  
  <p>Changing the <code>Type</code> to have a non-pure function works, but is not appropriate in this case, because there cannot be an instance of <code>Type</code> in my code, only classes which inherit from it should be able to exist.</p>