Template AliasPack

Same as an AliasSeq that does not auto expand.

template AliasPack(T...) ;

You can get to the provided compile time sequence (AliasSeq) by accessing the .Unpack member. And if you want a recursive expansion there's UnpackDeep for that. Also a convenience .equals!(otherAliasPack) is provided.

See Also

- https://forum.dlang.org/post/mnobngrzdmqbxomulpts@forum.dlang.org


alias P = AliasPack!(1, int, "abc");
static assert( P.equals!(1, int, "abc"));
static assert(!P.equals!(1, int, "cba"));

static assert(P.Head == 1);
static assert(P.Tail.equals!(int, "abc"));
static assert(is(P.Tail.Head == int));
static assert(P.Tail.Tail.Head == "abc");

alias PackOfPacks = AliasPack!(AliasPack!(1, int), AliasPack!(2, float), 17);
static assert(AliasPack!(PackOfPacks.UnpackDeep).equals!(1, int, 2, float, 17));