www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19596] New: Docs on .walkLength are wrong

https://issues.dlang.org/show_bug.cgi?id=19596

          Issue ID: 19596
           Summary: Docs on .walkLength are wrong
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: porton narod.ru

https://dlang.org/phobos/std_range_primitives.html#walkLength

"This is a best-effort implementation of length for any kind of range."

This statement from the docs is not true.

walkLength (and probably some other functions) do not work for a range with
 disable'd copy constructor. So it is not "for any kind of range" as claimed in
the docs.

Correct either the code to conform the docs or the docs.

--
Jan 19