When can a base class have a different layout than the corresponding complete object type? : <p>GCC and Clang do not perform C++17’s guaranteed copy elision when a base class constructor is called; see <a href="https://stackoverflow.com/questions/46065704/why-isnt-rvo-applied-to-base-class-subobject-initialization">this question</a> and the corresponding <a href="https://bugs.llvm.org/show_bug.cgi?id=34516" rel="noreferrer">Clang bug report</a> for details.</p>

<p>In response to the bug report, <a href="https://bugs.llvm.org/show_bug.cgi?id=34516#c1" rel="noreferrer">Richard Smith states</a>:</p>

<blockquote>
  <p>This is a defect in the standard wording. Copy elision cannot be guaranteed when initializing a base class subobject, because base classes can have different layout than the corresponding complete object type.</p>
</blockquote>

<p>Under what circumstances can a base class have a “different layout than the corresponding complete object type” in a way that makes guaranteed copy elision impossible? Is there a concrete example that illustrates this?</p>
