On Sun, 24 May 2015 23:32:50 +0000, ZombineDev wrote:

> I know I can call a base implementation of a method like in 3), but I
> need to do it generically like in 2). Does anybody now how I can achieve
> this?

i don't know why you want that, but something like this may do:

auto callBaseMethod(string MTN, C, Args...) (inout C self, Args args) {
  alias FSC = BaseClassesTuple!(C)[0];
  return mixin(`self.`~FSC.stringof~`.`~MTN~"(args)");
}

writeln(d.callBaseMethod!"toString");


> Additionally is there a way to make 1) work without using string mixins?

no. and again, why do you want that? why do you people are so afraid of 
string mixins? ;-)

Attachment: signature.asc
Description: PGP signature

Reply via email to