Iterating over containers of immutable objects

Jesse Phillips jessekphillips+D at gmail.com
Tue Jun 29 16:43:42 PDT 2010


Justin Johansson Wrote:

> Steven Schveighoffer wrote:
> > while(auto bar = iter.next())	// line 37
> > {
> >   ...
> > }
> 
> Sorry that does not compile, dunno if it should I'm using
> the latest D2.

I believe it needs to be written:

T bar;

while(bar = iter.next()) {
    ....
}


More information about the Digitalmars-d mailing list