Topic: ctor inheritance
Author: Loic Tregan@epita.fr (tregan_l)
Date: 1995/06/08 Raw View
In article <3r4nve$43e@senator-bedfellow.MIT.EDU>, angeld@mit.edu (Angel De La Cruz) writes:
-=)> In article <3r4ip9$3oh@boson.epita.fr>, Loic Tregan@epita.fr (tregan_l) writes:
-=)> > I used to have a long discussion about ctors inheritance. Here there is the (
-=)> >well, my ... ) summarize :
-=)> Thanks for the info...very educational. Its unfortunate there's no elegant
-=)> solution. So, if I have a base class with lots of ctors, anytime I want to derive
-=)> a simple class that adds no new data and does not require its own ctors, I have to:
-=)> 1. Copy all the base class ctor declarations into the derived class header file
-=)> and change the name of each ctor to the name of the derived class.
-=)> 2. Using a combination of cut/paste and manual editing for EACH ctor, create
-=)> a definition for the derived class that simply calls the base class ctor.
-=)> My main concerns with this are:
-=)> A. lots of extra typing
-=)> B. error prone
-=)> C. If I want to add/delete/modify the base class ctors, I have to modify
-=)> all classes derived from this base class.
-=)> Sure would be nice to inherit those ctors......
I'm happy I've found someone who agree with mee. I had found nobody for 1
month. C++ is so perfect ...
PLEASE, if you any comment, please write it, because I was given no argument
against that, and I'm crying each week because I can't inherit.
For example, if your are a member of the comitee, why wouldn't you like to
include it ? ( I think there would be many trumbles of compatibilty with
existing source and implementation of the compilers )