Joining AliasSeq/TypeTuple s

Ali Çehreli via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Mar 29 14:38:03 PDT 2016


On 03/29/2016 02:33 AM, Voitech wrote:
> Hi, i want to join two or more tupples in to one, with mixing the
> indexes like roundRobin but in compile time.
>
> unittest{
> import std.meta;
> alias first=AliasSeq!(int, string,bool);
> alias second=AliasSeq!("abc","def","ghi");
> alias third=...
>
> static assert(third==AliasSeq!(int, "abc", string, "def", bool, "ghi"));
> }

Just a reminder that if you needed to concatenate, then it would be 
trivial due to automatic expansion of AliasSeq elements:

     alias third = AliasSeq!(first, second);

Ali



More information about the Digitalmars-d-learn mailing list