std.mixins

Philippe Sigaud philippe.sigaud at gmail.com
Tue Aug 31 15:20:39 PDT 2010


On Wed, Sep 1, 2010 at 00:05, Lutger <lutger.blijdestijn at gmail.com> wrote:


> wtf it works! That's a cool trick / workaround, thanks.
>
>
That'd be cool if this worked too:

foreach(i,_; test) // since test is iterable

or even:

foreach(i,_; typeof(test)) // int[3] -> consider it as (int,int,int) and
iterate.

Halas, no. Though it's easy to transform a static array into a type tuple of
the same length and same element type.

Philippe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20100901/a90853e3/attachment.html>


More information about the Digitalmars-d mailing list