Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions std/algorithm/comparison.d
Original file line number Diff line number Diff line change
Expand Up @@ -804,9 +804,10 @@ pure @safe unittest
assert(result > 0);
}

// cmp for string with custom predicate fails if distinct chars can compare equal
// https://issues.dlang.org/show_bug.cgi?id=18286
@nogc nothrow pure @safe unittest
{
// Issue 18286: cmp for string with custom predicate fails if distinct chars can compare equal
static bool ltCi(dchar a, dchar b)// less than, case insensitive
{
import std.ascii : toUpper;
Expand All @@ -819,9 +820,10 @@ pure @safe unittest
static assert(cmp!ltCi("apple", "APPLE") == 0);
}

// for non-string ranges check that opCmp is evaluated only once per pair.
// https://issues.dlang.org/show_bug.cgi?id=18280
@nogc nothrow @safe unittest
{
// Issue 18280: for non-string ranges check that opCmp is evaluated only once per pair.
static int ctr = 0;
struct S
{
Expand Down
Loading