[Issue 5691] walkLength() compatible with opApply()
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Mar 3 14:50:13 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5691
--- Comment #4 from Jonathan M Davis <jmdavisProg at gmx.com> 2011-03-03 14:47:19 PST ---
And since when is a range created by opApply? It's not a range until it's a
type with the appropriate functions on it. Sure, you could feed a struct with
opApply to std.array.array and get an array, which is then a range. But
something that uses opApply is _not_ a range.
opApply is designed specifically for use with foreach. It is not a range and is
similar to a range only in that it is related to iterating over a list of
items. If you want to treat something with opApply as a range, then make it a
range or wrap it in one. It's going to rightfully fail for isInputRange,
isForwardRange, etc. It is _not_ a range and should not be treated as one.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list