And if you add this, it gets even more interesting:
void main() {
alias myFunc = ctKwargify!func.wrap;
myFunc!(Bar(2), Baz(3), Foo(1));
myFunc!(Baz(3), Foo(1));
}
template ctKwargify(alias F) {
template wrap(T...) {
alias wrap = ctKwargs!(F, T);
}
}
template ctKwargifier(alias F) {
template inner(T...) {
alias ctKwargifier = ctKwargs!(F, T);
}
}
I might have gone insane now.
