POV-Ray : Newsgroups : povray.off-topic : Wahahahaha! : Re: Wahahahaha! Server Time
11 Oct 2024 21:17:28 EDT (-0400)
  Re: Wahahahaha!  
From: Warp
Date: 9 Nov 2007 07:54:26
Message: <47345881@news.povray.org>
Invisible <voi### [at] devnull> wrote:
> Presumably that means that if you do sufficiently freaky things with 
> pointers to pointers to data through multiple levels of type casts, the 
> compiler can't figure out what you're actually doing or something.

  Or you simply have a regular function in the base class, this function
gets called in the initialization list of the base class constructor, and
in the implementation of this function you call a pure virtual function.

  It would be difficult for the compiler to follow how the functions are
being called (and, in fact, it's impossible for it to know if the pure
virtual function actually gets called in the general case).

  The problem with calling a pure virtual function in the base class
constructor is that the derived class has yet not been initialized and
thus calling a derived class function implementation could cause undefined
behavior because it's not constructed.

-- 
                                                          - Warp


Post a reply to this message

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