This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: New C++ Attribute: final
- From: Jeff Sturm <jsturm at one-point dot com>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: Kevin Atkinson <kevina at gnu dot org>, Mark Mielke <mark at mark dot mielke dot cc>, <gcc at gcc dot gnu dot org>
- Date: Mon, 1 Mar 2004 09:51:41 -0500 (EST)
- Subject: Re: RFC: New C++ Attribute: final
On Mon, 1 Mar 2004, Nathan Sidwell wrote:
> Kevin Atkinson wrote:
> > Well yes I got the name from Java. But that doesn't mean that it can't be
> > useful is C++ also. Furthermore this attribute is mainly an
> > optimization so your program will still be correct without it.
>
> In Java, the point of 'final' is to say 'not virtual', because all
> non static member functions are implicitly virtual. In C++ there's no need.
If a base class declares a method 'virtual' in C++, can a derived class
override the modifier, such that calls to the overridden method do
not require vtable dispatch?
Jeff