Yet another MRV proposal!

Janice Caron caron800 at googlemail.com
Thu Apr 24 12:11:57 PDT 2008


On 15/04/2008, Janice Caron <caron800 at googlemail.com> wrote:
> This is already valid, working, D:
>
>    import std.typecons
>
>    Tuple!(int,float) test()
>    {
>         return Tuple!(int,float)(1,2);
>    }
>
>    auto t = test();
>    int a = t._0;
>    float b = t._1;

Hey, we're getting there! Here's something I missed. The return
statement above could have been rewritten as:

        return tuple(1,2f);

which is much more convenient.



More information about the Digitalmars-d mailing list