www.digitalmars.com         C & C++   DMDScript  

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


          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 puremagic.com
          Reporter: porton 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.

Jan 31 2019