Alias/Ref Tuples ?

Simen Kjærås simen.kjaras at gmail.com
Fri Dec 16 12:11:57 PST 2011


On Fri, 16 Dec 2011 14:00:11 +0100, Joshua Reusch <yoschi at arkandos.de>  
wrote:

> Hello,
>
> is there a way to say something like
>
> ---
> int a, b;
> AliasTuple!(a, b) = tuple(4,5);
> assert(a == 4 && b == 5);
> ---
>
> without having to write an own AliasTuple template ? I want to use it  
> for functions returning multiple values.

There is one in dranges:

http://dsource.org/projects/dranges

It is not officially documented, and I don't know how good it actually is,
but here's what documentation exists:

http://svn.dsource.org/projects/dranges/trunk/dranges/docs/reftuple.html


More information about the Digitalmars-d-learn mailing list