Merge tuples
simendsjo
simendsjo at gmail.com
Thu May 31 08:11:48 PDT 2012
On Thu, 31 May 2012 16:54:53 +0200, Alex Rønne Petersen <alex at lycus.org>
wrote:
> On 31-05-2012 16:53, simendsjo wrote:
>> This is probably very simple, but I cannot find out how to do it..
>>
>> I have several variables, and want to construct a tuple for the values.
>> int a;
>> string b;
>> ToTuple!(a, b) should create Tuple!(int, "a", string, "b")
>>
>> template ToTuple(Variables...) {
>> ?
>> }
>
> Just look at std.typecons.Tuple.
>
I did, but I don't know how to lower it so I don't get tuples of tuples:
Tuple!(int,"a"c,Tuple!(string,"b"c))
More information about the Digitalmars-d-learn
mailing list