inheriting ctors?
Rory Mcguire
rjmcguire at gm_no_ail.com
Fri Aug 6 12:59:30 PDT 2010
dcoder wrote:
> Suppose I have a base class with many ctors().
>
> I want to inherit from the base class and make one slight alteration to
> it, but I don't want to write X times the following:
>
> this(args) {
> super(args);
> }
>
> Does D have an easy way for the derived class to 'inherit' all or some of
> the base class ctors(), and just override/add ctors() in the derived
> class?
>
> In Java, we can use eclipse to auto-generate code for us. :) But,
> the results look cluttered, and it's really not a solution.
>
> Anyways, just curious.
>
> thanks.
Here is a possible solution to your problem:
-Rory
-------------- next part --------------
A non-text attachment was scrubbed...
Name: constructors.d
Type: text/x-dsrc
Size: 1382 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20100806/21347d40/attachment.d>
More information about the Digitalmars-d-learn
mailing list