Repost: make foreach(i, a; range) "just work"

Steven Schveighoffer schveiguy at yahoo.com
Thu Feb 20 09:09:31 PST 2014


On Thu, 20 Feb 2014 11:07:32 -0500, Regan Heath <regan at netmail.co.nz>  
wrote:

> Only if the compiler prefers opApply to range methods, does it?

It should. If it doesn't, that is a bug.

The sole purpose of opApply is to interact with foreach. If it is masked  
out, then there is no point for having opApply.

-Steve


More information about the Digitalmars-d mailing list