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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jan 31 23:29:26 UTC 2019


Alex <sascha.orlov at gmail.com> changed:

           What    |Removed                     |Added
                 CC|                            |sascha.orlov at gmail.com

--- Comment #1 from Alex <sascha.orlov at gmail.com> ---
Arent't "in" and contains already properties of a SortedRange object? How comes
that your SortedRange is not sorted? 

According to 
the check for sortedness would require O(r.length) evaluations. I don't think,
you really want to have this check run every evaluation of "in" or contains, do


More information about the Digitalmars-d-bugs mailing list