AliasPack

Same as an AliasSeq that does not auto expand.

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.

Members

Aliases

Head
alias Head = void
Undocumented in source.
Head
alias Head = Alias!(T[0])
Undocumented in source.
Tail
alias Tail = AliasPack!(T[1..$])
Undocumented in source.
Tail
alias Tail = AliasPack!()
Undocumented in source.
Unpack
alias Unpack = T
Undocumented in source.
UnpackDeep
alias UnpackDeep = UnpackDeepImpl!T
Undocumented in source.

Manifest constants

length
enum length;
Undocumented in source.

Templates

equals
template equals(U...)
Undocumented in source.

Examples

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));

See Also

Meta