Boost logo

Boost :

From: Rob Stewart (stewart_at_[hidden])
Date: 2004-06-02 15:09:25


From: "Andreas Huber" <ah2003_at_[hidden]>
> Johan Nilsson wrote:
> [snipped example of calling virtual functions from a state ctor]
>
> I'm too lazy to look in the standard what exactly is allowed w.r.t calling
> virtual functions from ctors, but I'd very much expect that this should work
> (since we're *not* calling a function that is potentially overridden in a
> derived class).

The function as overridden in the class of the running ctor is
called. (If that class doesn't override the function, then the
base class' version is the current class' version.)

-- 
Rob Stewart                           stewart_at_[hidden]
Software Engineer                     http://www.sig.com
Susquehanna International Group, LLP  using std::disclaimer;

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk