|
|
Warp wrote:
> I guess that you are not really instantiating an abstract class, or either
> you are doing something really weird which somehow is able to bypass the
> compiler checks (in which case you get UB, of course).
I don't know. I've seen it happen at runtime with "trying to invoke pure
virtual function" on Windows, and now I'm getting some of the same sorts of
messages from a Linux program (from a place where you're supposed to fill in
as you port it, so not entirely unexpected).
If you had class Beta as a concrete child of abstract class Alpha, and you
assigned a Beta to the Alpha (as in slicing it), the compiler would still
complain when you tried to invoke the undefined function in Alpha, wouldn't it?
--
Darren New, San Diego CA, USA (PST)
There's no CD like OCD, there's no CD I knoooow!
Post a reply to this message
|
|