Adding overloaded methods

BLM blm768 at gmail.com
Tue Feb 21 18:21:43 PST 2012


I'm working on a project where I'm using overloaded virtual methods, and I've
run into a challenge with overload sets.

My code looks something like this:

class Base {
 void get(ubyte b) {};
}

class Derived: Base {
 //alias Base.get get;
 void get(string s) {};
}

I've tried using an alias declaration to combine the two classes' overload
sets in the derived class, but DMD complains that the alias conflicts with
get(string). Is there some reasonably elegant way around this, or is it a
limitation of the language?


More information about the Digitalmars-d-learn mailing list