January 31, 2019 [Issue 19637] Add a pre-condition to "in" and contains() | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=19637 Alex <sascha.orlov@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sascha.orlov@gmail.com --- Comment #1 from Alex <sascha.orlov@gmail.com> --- Arent't "in" and contains already properties of a SortedRange object? How comes that your SortedRange is not sorted? According to https://dlang.org/phobos/std_algorithm_sorting.html#.isSorted 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 you? -- |
January 31, 2019 [Issue 19637] Add a pre-condition to "in" and contains() | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=19637 Victor Porton <porton@narod.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #2 from Victor Porton <porton@narod.ru> --- I have not noticed that contains() is a member of SortedRange. So, you are right, I am closing the bug. -- |
Copyright © 1999-2021 by the D Language Foundation