[Issue 13468] std.algorithm.canFind(null) fails with class

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Oct 2 10:07:04 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=13468

--- Comment #3 from hsteoh at quickfur.ath.cx ---
Workaround:

Instead of using the default predicate "a==b" with null (i.e., effectively "a
== null"), use this instead:

    if (canFind!"a is null"(b)) { ... }

--


More information about the Digitalmars-d-bugs mailing list