is there a general solution to pass multiple arguments to a function via a
mixin?

see below for a partial solution using Alias, which fails for the last case
below:

void main(){
  import std.stdio;
  string a="A";
  string b="B";
  writeln(a,b);// OK (prints "AB")
  writeln(&a,&b);//OK (prints both addresses)
  writeln(mixin(`a,b`));//prints "B"
  import std.typetuple;
  writeln(mixin(`Alias!(a,b)`));//OK:prints "AB"
  //writeln(mixin(`Alias!(&a,&b)`));//CT Error: expression & a is not a
valid template value argument
}

Reply via email to