Dynamic Ctors ?
Voitech via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Feb 6 10:05:05 PST 2016
Hi, i have a variadic args template, with a class inside
something like:
template foo(T...){
class Inner(){
...
...
}
}
Now i want to make Inner create or i will create manually,
constructor for each of T... parameter types, but don't know what
is syntax for it. I found that there is possibility to initialize
T... types static variables with AliasSeq!(T) but how to do this
automatically, or with static ifs,for constructors ?
I tried ...
template foo(T...){
alias Types=AliasSeq!(T);
Algebraic!(T) value;
this(Types value)
this.value=value;
}
}
But this dosn't work
More information about the Digitalmars-d-learn
mailing list