On Fri, 16 Mar 2012 03:26:55 +0100, Andrei Alexandrescu
<seewebsiteforem...@erdani.org> wrote:
I think this is a reasonable request:
(auto a, b) = fun();
--->
static assert(fun().length == 2);
auto __t = fun();
auto a = __t[0];
auto b = __t[1];
That would be nice. As was mentioned in a later post, this works for
static arrays, too.
Now, a pattern that our productive friend bearophile posted earlier was
this:
int[] foo();
(auto a, b) = foo();
--->
auto __t = foo();
assert( __t.length > 0 );
auto a = __t[0];
auto b = __t[1..$];
Is this something we might also want?