foreach syntax, std.mixin

dsimcha dsimcha at yahoo.com
Wed Nov 11 07:48:06 PST 2009


== Quote from Philippe Sigaud (philippe.sigaud at gmail.com)'s article
> --0016e6d99ba70494130478196284
> Content-Type: text/plain; charset=ISO-8859-1
> On Sun, Nov 8, 2009 at 22:43, dsimcha <dsimcha at yahoo.com> wrote:
> >
> > Hot off the press and VERY prototype-ish:
> >
> > Code:
> > http://pastebin.com/m2087e524
> >
> > Docs:
> >
http://cis.jhu.edu/~dsimcha/unpackEnumerate.html<http://cis.jhu.edu/%7Edsimcha/unpackEnumerate.html>
> >
> > Cool! Thanks a lot.
> I looked at opApply for D1 maybe two years ago, but never used it myself.
> I'll go and read this part of the docs.
> *test it*
> Hmm, I can get enumerate to work, but the Unpack part doesn't compile. It
> complains elem.at!(0) is not an lvalue.

Argh.  That's because I was hacking around with Zip in my copy of Phobos right
before I wrote this lib and forgot to change some stuff back to stock when
testing.  If you uncomment a /*ref*/ in there somewhere, which was leftover from a
compiler bug a long time ago, it seems to work.  The real problem is that that bit
of cruft hasn't been removed from Phobos yet.



More information about the Digitalmars-d mailing list