xxxxxxxxxx
/+dub.sdl:
dependency "optional" version="~>0.11.1"
+/
import std.stdio;
import std.meta;
import bolts.meta;
template split(seq...) if (seq.length % 2 == 0) {
static if (seq.length >= 2) {
alias Pair = AliasPack!(seq[0], seq[1]);
alias split = AliasSeq!(Pair, .split!(seq[2..$]));
} else {
alias split = AliasSeq!();
}
}
alias Packs = split!(int, "x", float, "y", double, "z");
enum Name(int index) = Packs[index].Unpack[1];
alias Type(int index) = Packs[index].Unpack[0];
pragma(msg, Packs.length);
pragma(msg, Name!0, " is ", Type!0);
pragma(msg, Name!1, " is ", Type!1);
pragma(msg, Name!2, " is ", Type!2);
void main() {
}