Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!vsi1!daver!tscs!tct!chip From: chip@tct.uucp (Chip Salzenberg) Newsgroups: comp.lang.c++ Subject: Re: Virtual functions used in constructor illegal ! ?? Keywords: virtual functions, constructor Message-ID: <27556AD1.350C@tct.uucp> Date: 29 Nov 90 20:08:47 GMT References: <822@orthogo.UUCP> <39733@ucbvax.BERKELEY.EDU> Organization: Teltronics/TCT, Sarasota, FL Lines: 14 According to jbuck@galileo.berkeley.edu (Joe Buck): >[E&S] actually says that if you do call a virtual method in the >constructor, that the base class method is always called, even >if you redefine the method. This is true, but only if you are calling the virtual function from the actual constructor function body. If you call a virtual function from a constructor by other means, such as calling a function that calls the virtual function, E&S says that the behavior is undefined, i.e. all bets are off. -- Chip Salzenberg at Teltronics/TCT , "I've been cranky ever since my comp.unix.wizards was removed by that evil Chip Salzenberg." -- John F. Haugh II