Stop TypeTuple as template parameter from expanding

Dejan Lekic dejan.lekic at gmail.com
Fri Nov 4 07:30:38 PDT 2011


bearophile wrote:

> Tobias Pankrath:
> 
>> How would you do this? Do I need an extra template TypeList?
> 
> It's the design of typetuples, they are auto-flattening. I have never
> appreciated this design. Maybe Walter likes them this way, or they can't
> be designed in another way, I don't know.
> 
> Bye,
> bearophile

bearophile - I believe it is a matter of taste.
I actually prefer it the D way because (S, T...) is a TypeTuple as well. 
(MyList, A, B, C) expands to (A, B, C, A, B, C) so it makes sense that Test 
prints what it prints. It is all natural to me... It should be like that in 
my humble opinion. Perhaps the documentation should be more clear about 
this.


More information about the Digitalmars-d-learn mailing list