containers, iteration, and removal

Ellery Newcomer ellery-newcomer at utulsa.edu
Mon Aug 27 10:13:08 PDT 2012


On 08/27/2012 06:27 AM, Steven Schveighoffer wrote:
> On Fri, 24 Aug 2012 13:35:57 -0400, Steven Schveighoffer
> <schveiguy at yahoo.com> wrote:
>
>
>> foreach(bool doRemove, item; container)
>> {
>>     doRemove = predicate(item);
>> }
>
> Whoops, should be
>
> foreach(ref bool doRemove, item; container)
>
> -Steve

Right, I totally forgot about that one.


More information about the Digitalmars-d mailing list