Tuple/TypeTuple etc.

John Colvin john.loughran.colvin at gmail.com
Sat Aug 17 07:19:04 PDT 2013


On Saturday, 17 August 2013 at 14:04:21 UTC, Dicebot wrote:
> On Saturday, 17 August 2013 at 13:55:10 UTC, John Colvin wrote:
>>> And std.typecons.Tuple is completely different beast, it 
>>> simply a template struct.
>>
>> Yes, as I said: It's a wrapper around an instantiation of a 
>> type-tuple.
>
> By that logic every single possible template with variadic 
> parameters is wrapper around instantiation of type tuple. 
> std.typecons.Tuple does not store expression tuple inside so I 
> don't think it is legal to call it a "wrapper". Simply 
> pseudo-anonymous struct with pseudo-anonymous fields.

I'm afraid if you look at the implementation of 
std.typecons.Tuple, it does exactly what you say it doesn't do. 
The struct-like aspects (e.g. named access) are simulated using 
aliases.


More information about the Digitalmars-d mailing list