[Issue 5691] walkLength() compatible with opApply()

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 3 13:37:13 PST 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5691


Jonathan M Davis <jmdavisProg at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|rejects-valid               |
                 CC|                            |jmdavisProg at gmx.com
         OS/Version|Windows                     |All
           Severity|normal                      |enhancement


--- Comment #1 from Jonathan M Davis <jmdavisProg at gmx.com> 2011-03-03 13:34:19 PST ---
Why? walkLength specifically works on _ranges_. A struct with opApply is _not_
a range. I see no reason for it to work with opApply. Not only is it in
std.range, but it _specifically_ says that it works on ranges. And since when
do the functions in std.range or std.algorithm work on structs with opApply?
They all have template constraints like isForwardRange, which sure isn't going
to work on a struct with opApply. walkLength isn't even design to work on a
container or collection. It works on _ranges_. That's it. I see no reason to
contort it to work with opApply.

-- 
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