Where is 'tuple' in the language reference
Jacob Carlborg
doob at me.com
Sat Aug 6 02:10:57 PDT 2011
On 2011-08-05 11:10, Jonathan M Davis wrote:
> On Friday 05 August 2011 08:55:32 Steve Teale wrote:
>> I see the term used, but I can't find where it is defined.
>
> Probably nowhere. There are no built-in tuples in D. std.typecons.Tuple is
> probably what you're looking for. It's a struct which defines a tuple. There's
> also std.typetuple.TypeTuple which is a compile time construct useful in meta-
> programming. But there is no tuple built into D. There has been some
> discussion of improving the syntactic sugar with regards to std.typecons.Tuple
> - either via some additional templates or possibly adding something to the
> language itself - but that hasn't happened yet, and there are no tuples built
> into D.
>
> - Jonathan M Davis
There's .tupleof, I would consider that built-in.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list