POV-Ray : Newsgroups : povray.off-topic : C++ question : Re: C++ question Server Time
29 Sep 2024 13:27:41 EDT (-0400)
  Re: C++ question  
From: Darren New
Date: 8 Apr 2009 17:21:11
Message: <49dd1547$1@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.