[Sharing]Tuple to variables (My Function)

bearophile bearophileHUGS at lycos.com
Fri Jun 14 17:47:00 PDT 2013


MattCoder:

> void tupleToVar(A, T...)(A inTuple, ref T listParams){

I think in the C++11 STL a similar function is named tie.


>     if(!(i<inTuple.length))
>       break;

You have to verify in the function constraint that the lengths 
match.


> It would be nice if it could appear more like python, but I 
> think this would be a internal dev.

There is a DIP about it, but it's currently stalled:
http://wiki.dlang.org/DIP32

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list