Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/stable' into merge_stable
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuclaw committed Dec 2, 2023
2 parents 8c39523 + 1c52bd6 commit 4c07d45
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 23 deletions.
3 changes: 0 additions & 3 deletions changelog/PR8804.dd

This file was deleted.

7 changes: 0 additions & 7 deletions changelog/is_input_range_element.dd

This file was deleted.

13 changes: 0 additions & 13 deletions changelog/unshared.dd

This file was deleted.

12 changes: 12 additions & 0 deletions std/uni/package.d
Original file line number Diff line number Diff line change
Expand Up @@ -7706,6 +7706,12 @@ public:
return this.tupleof == other.tupleof;
}

// Define a default toHash to allow AA usage
size_t toHash() const @trusted
{
return hashOf(slen_, hashOf(small_));
}

/++
True if this object contains valid extended grapheme cluster.
Decoding primitives of this module always return a valid `Grapheme`.
Expand Down Expand Up @@ -7907,6 +7913,12 @@ static assert(Grapheme.sizeof == size_t.sizeof*4);
assert(equal(h[], iota(cast(int)'A', cast(int)'Z'+1)));
}

// ensure Grapheme can be used as an AA key.
@safe unittest
{
int[Grapheme] aa;
}

/++
$(P Does basic case-insensitive comparison of `r1` and `r2`.
This function uses simpler comparison rule thus achieving better performance
Expand Down

0 comments on commit 4c07d45

Please sign in to comment.