diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2023-12-07 11:55:12 +0100 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2023-12-11 11:06:23 +0100 |
commit | f9b4dbb8ac75f96c4897ba9aafcaf0bbad4fbe44 (patch) | |
tree | 0cbb768778c3ece2ccdae2f1e34aceb483917c1d /libphobos/src/std/uni | |
parent | 63194a0e8ede9e15dfa01c6ec7aeea8f7702d3b7 (diff) | |
download | gcc-f9b4dbb8ac75f96c4897ba9aafcaf0bbad4fbe44.zip gcc-f9b4dbb8ac75f96c4897ba9aafcaf0bbad4fbe44.tar.gz gcc-f9b4dbb8ac75f96c4897ba9aafcaf0bbad4fbe44.tar.bz2 |
d: Merge upstream dmd, druntime 2bbf64907c, phobos b64bfbf91
D front-end changes:
- Import dmd v2.106.0.
D runtime changes:
- Import druntime v2.106.0.
Phobos changes:
- Import phobos v2.106.0.
gcc/d/ChangeLog:
* Make-lang.in (D_FRONTEND_OBJS): Rename d/common-string.o to
d/common-smallbuffer.o.
* dmd/MERGE: Merge upstream dmd 2bbf64907c.
* dmd/VERSION: Bump version to v2.106.0.
* modules.cc (layout_moduleinfo_fields): Update for new front-end
interface.
(layout_moduleinfo): Likewise.
libphobos/ChangeLog:
* libdruntime/MERGE: Merge upstream druntime 2bbf64907c.
* src/MERGE: Merge upstream phobos b64bfbf91.
Diffstat (limited to 'libphobos/src/std/uni')
-rw-r--r-- | libphobos/src/std/uni/package.d | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libphobos/src/std/uni/package.d b/libphobos/src/std/uni/package.d index 9903d6c..fec7e5f 100644 --- a/libphobos/src/std/uni/package.d +++ b/libphobos/src/std/uni/package.d @@ -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`. @@ -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 |