Concatenating Tuples

BCS ao at pathlink.com
Tue Oct 14 20:40:00 PDT 2008


Reply to dsimcha,

> Is there a way to concatenate tuples at compile time in D2?  The
> obvious ~ operator doesn't work on tuples.  Also, while I'm at it,
> maybe there's a better way to achieve my end goal here.  Is there a
> way to get a tuple representation of a class object that includes the
> stuff from the base classes?
> 

just put them side by side.

template Tpl(T...) { alias T Tpl; }

alias Tpl!(a,b,c) A;
alias Tpl!(d,e,f) B;
alias Tpl!(A,B) C;





More information about the Digitalmars-d mailing list