Per [intro.object]/2:
[..] An object that is not a subobject of any other object is called a complete object [..].
So consider this snippet of code:
struct Base {};
struct Derived : Base {};
struct MostDerived : Derived {};
I can't understand the wording in this quote from the standard:
If a complete object, a member subobject, or an array element is of class type, its type is considered the most derived class [..] An object of a most derived class type or of a non-class type is called a most derived object.
From the quote what I understand is that a type of a complete object is of "most-derived" class type. I stopped here, I really do not understand the rest of the wording.
Per the question "What does the "most derived object" mean?" I think that (correct me if I am wrong), objects of type "most-derived" class only, like
MostDerived, are called "most-derived" objects. Is this true?If I have created an object of
Baselike this:Base b_obj = Base(), is the objectb_obja "most-derived" object?If I have created an object of
Derivedlike this:Derived d_obj = Derived(), is the objectd_objalso a "most-derived" object?Does the word "derived" in "most-derived" mean that the object is an object of a class like
MostDerived, or mean that the object has no class subobject in it?