GCC and Clang do not perform C++17’s guaranteed copy elision when a base class constructor is called; see this question and the corresponding Clang bug report for details.
In response to the bug report, Richard Smith states:
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.
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?