[Issue 9493] std.algorithm.canFind returns true for empty string in array of integers
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Feb 9 13:26:32 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=9493
--- Comment #6 from monkeyworks12 at hotmail.com 2014-02-09 13:26:30 PST ---
(In reply to comment #5)
> My thoughts:
>
> 1. We cannot change the fact that int is comparable with dchar. It would break
> too much code.
> 2. We cannot change the fact that canFind works with two ranges of comparable
> elements. It was part of the design, and would break too much code anyway.
>
> I don't see any way around this.
>
> I admit that at a first glance it doesn't look like it should compile, but it
> does make sense once you consider what's happening.
I suppose, though maybe it should say in the documentation that such edge cases
may occur, using this as an example.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list