title: Why isn't RVO applied to base class subobject initialization?
body: <p>Why is the move constructor for <code>Base</code> mandatory in case of inheritance (<code>class B</code>) in the following code (both in gcc 7.2 and clang 4.0)? I would expect it not to be required with guaranteed copy elision in C++17, as in case of composition (<code>class A</code>).</p>
  
  <pre><code>struct Base {
      Base(Base&amp;&amp;) = delete;
      Base&amp; operator=(Base&amp;&amp;) = delete;
  
      Base()
      {
      }
  };
  
  Base make_base()
  {
      return Base{};
  }
  
  struct A {
      A() : b(make_base()) {} // &lt;&lt;&lt;--- compiles fine
  
      Base b;
  };
  
  #ifdef FAIL
  struct B : public Base {
      B() : Base(make_base()) {} // &lt;&lt;&lt;--- "Base(Base&amp;&amp;) is deleted"
  };
  #endif
  </code></pre>
  
  <p><a href="https://godbolt.org/g/w3jRuc" rel="noreferrer">example</a></p>