The attribute 'final' applies to class definitions and to virtual member functions being declared in a class definition. If the attribute is specified for a class definition, it is equivalent to being specified for each virtual member function of that class, including inherited member functions. If a virtual member function f in some class B is marked 'final' and in a class D derived from B, a function D::f overrides B::f, the program is ill-formed.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|