Merge tuples

Alex Rønne Petersen alex at lycus.org
Thu May 31 07:54:53 PDT 2012


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.

-- 
Alex Rønne Petersen
alex at lycus.org
http://lycus.org


More information about the Digitalmars-d-learn mailing list