You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[...] the object (call it x) under construction or destruction, the function called is the final overrider in the constructor's or destructor's class and not one overriding it in a more-derived class.
Final overrider is used as if it refers to a set of functions, which it does not, but rather a singular function. It would be better to say:
the function called is what would be the final overrider of the constructor's or destructor's class if it were the most-derived class.
The text was updated successfully, but these errors were encountered:
Editorial teleconference: The wording seems correct as written; whether a function is final overrider depends on which class it is considered a member of.
I would argue differently. Consider the following:
structA
{
virtualvoidf();
};
structB : A
{
voidf(); // overrides A::f, is the final overrider// in a most derived object of type B// but not in a most derived object of type C
};
structC : B
{
voidf(); // overrides A::f and B::f// is the final overrider // in a most derived object of type C
};
So, when an base class subobject of type B belonging to an object of type C is under construction, B::f() simply isn't a final overrider because C declares a function that overrides f. For any given class type, there is only one final overrider for each virtual function.
[class.cdtor] p4 says:
Final overrider is used as if it refers to a set of functions, which it does not, but rather a singular function. It would be better to say:
The text was updated successfully, but these errors were encountered: