[Issue 19637] New: Add a pre-condition to "in" and contains()

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jan 31 22:57:52 UTC 2019


          Issue ID: 19637
           Summary: Add a pre-condition to "in" and contains()
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: porton at narod.ru

Accordingly https://dlang.org/phobos/std_range.html "in" and contains() require
sorted range.

Please add pre-condition to check if it is really sorted.

This will help to locate subtle errors.


More information about the Digitalmars-d-bugs mailing list