Topic: Virtual constructors make no sens
Author: Valentin Bonnard <Bonnard.V@wanadoo.fr>
Date: 1999/09/17 Raw View
John Smith wrote:
> Does anybody know why these weren't introduced into the language.
A virtual function is a member function which acts
on an object, and whose behaviour depends on the
dynamic type of this object.
A constructor makes an object from nothing. It doesn't
act on an object.
Strictly speaking, ``virtual constructor'' makes
absolutely no sens. (I think Stroustrup explains that.)
End of the story.
Since a ``virtual constructor'' cannot exist,
people can use this term to mean other things.
--
Valentin Bonnard
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]