Re: cannot instantiate abstract class
"Victor Bazarov" <v.Abazarov@comAcast.net> wrote in message
news:PdedncEVnbBxGGPbnZ2dnUVZ_u6rnZ2d@comcast.com...
Ben Voigt [C++ MVP] wrote:
When you don't provide a non-pure final overrider to a pure virtual
function, the class is still abstract.
I guess you meant "most derived", not "final" in the sense of the
keyword "final"/"sealed" (depending on language).
There is the term "final overrider" in C++. There is no term "final"
or "sealed" in C++. I thought we were talking C++, so I used the C++
term applicable to the situation.
The Microsoft C++ compiler uses the keyword "sealed" as an extension (both
native and managed). In some other languages, it's "final".
http://msdn2.microsoft.com/en-us/library/0w2w91tf(VS.80).aspx
I was pretty sure that wasn't what you were referring to, but I wanted to
check.
The corresponding keyword "override" is pretty handy even in native code
(use a macro to make it go away for non-MS compilers), and would have helped
the OP find his problem if he has used it.
It is still possible for further derived classes to further override
the function.
The "final overrider" means the overrider in the class hierarchy for
the class that is being instantiated. It is possible to further
override, but it wouldn't make an iota of difference if the class
you are instantiating is not one of those "further derived ones".
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask