opApply not called for foeach(container)
monarch_dodra at gmail.com
Thu Jul 12 14:35:23 PDT 2012
On Thursday, 12 July 2012 at 21:18:21 UTC, Steven Schveighoffer
> If opSlice is to be used, this is how it should go (in order of
> 1. if aggr has opApply or opApplyReverse, use it.
> 2. if aggr has opSlice, and the result of aggr.opSlice() has
> opApply or opApplyReverse, use it.
> 3. if aggr has opSlice, and the result of aggr.opSlice() has
> empty/front/popfront, use it as in your 2a above.
> 4. if aggr has empty/front/popFront, use it as in your 2b above.
> 5. static or dynamic array.
> I should also note that the existence of opApply should not
> preclude later possibilities if that opApply can't compile for
> the given foreach parameters.
4.1:Make copy first.
More information about the Digitalmars-d