Given two AliasSeq (A and B) and template T, how to make AliasSeq!(T!(A[0], B[0]) ... T!(A[n], B[n])) ?

Nicholas Wilson via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Nov 26 23:27:17 PST 2016


On Sunday, 27 November 2016 at 06:01:13 UTC, Tofu Ninja wrote:
> Basically the title says it all.
>
> alias A = AliasSeq!(...);
> alias B = AliasSeq!(...);
> static assert(A.length == B.length);
> template T(An, Bn){ ... }
> alias C = AliasSeq!(T!(A[0], B[0]) ... T!(A[n], B[n])); // how 
> to make this :/
>
> How do I actually make the sequence C?

AliasSeq s auto expand. so

alias C = AliasSeq!(A,B);


More information about the Digitalmars-d-learn mailing list