Tuple/TypeTuple etc.
Timon Gehr
timon.gehr at gmx.ch
Sat Aug 17 07:05:34 PDT 2013
On 08/17/2013 02:37 PM, Dicebot wrote:
>>
>> 1) collections of items, called tuples. They can contain pretty much
>> anything you want, as long it's available at compile-time.
>> They are ***not types***. If and only if a tuple contains only types,
>> the tuple itself is a type. This is often referred to as a type-tuple.
>> In current D, tuples of all varieties are created by variadic template
>> parameters.*
>
> All true but last statement. They are not "created" anywhere, this is
> simply most convenient way to capture built-in tuple in a form usable by
> user code.
Actually, they are created like this:
Foo!(int,"hello",2)
^~~~~~~~~~~~~~~
std.typetuple.TypeTuple is the identity "function" on template argument
lists.
More information about the Digitalmars-d
mailing list