Tuple DIP
Rubn
where at is.this
Sat Jan 13 00:51:15 UTC 2018
Should include an example of returning a tuple from a function. I
know one of the pains with variadic templates is that they can't
be returned.
So maybe something that goes over the following use case:
auto returnTuple(Args...)(Args args)
{
return args;
}
(int a, float b) = returnTuple(4, 1.0f);
Or just returning your regular tuple:
(int, float) returnSomeTuple()
{
return (10, 1.0f); // or whatever
}
More information about the Digitalmars-d
mailing list