mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 14:31:31 +00:00
The home of the ICU project source code.
The existing polymorphic equality operators that use different types for the `this` and `other` objects are ambiguous with C++20 resolution rules that require equality for reversed arguments. In order to resolve that, while also possibly making the implementation somewhat simpler overall, the implementation classes (LocaleCacheKey and DateFmtBestPatternKey) now get normal (non-polymorphic) equality operators that are trivially non-ambiguous (and as a bonus also don't need any type casts), while the dynamic type checking logic is moved into protected helper functions, which in the end are invoked (without any ambiguity) by friend operators in the base class. This way, all equality testing of cache key objects ends up taking one of these two possible paths: 1. Both sides of the equality operator are of the same implementation type (ie. LocaleCacheKey or DateFmtBestPatternKey): The type specific equality operator is called directly, comparing the relevant attributes of the two objects directly. 2. The two sides of the equality operator are either of different types or of some base class type: The friend equality operators of CacheKeyBase call the virtual helper function to figure out whether the two objects are actually of the same type and if they are and this type is an implementation type then does the necessary type cast to get to 1. |
||
---|---|---|
.ci-builds | ||
.github | ||
docs | ||
icu4c | ||
icu4j | ||
tools | ||
vendor/double-conversion | ||
.bazeliskrc | ||
.cpyskip.txt | ||
.gitattributes | ||
.gitignore | ||
KEYS | ||
README.md | ||
WORKSPACE |
International Components for Unicode
This is the repository for the International Components for Unicode. The ICU project is under the stewardship of The Unicode Consortium.
- Source: https://github.com/unicode-org/icu
- Bugs: https://unicode-org.atlassian.net/projects/ICU
- API Docs: https://unicode-org.github.io/icu-docs/
- User Guide: https://unicode-org.github.io/icu/
🔴🔴🔴 Special Notice About Branch Renaming 🔴🔴🔴
Around March 24-25, 2021 we renamed the master
branch to main
. You may need to rename your branch in your local git repo and change your normal git command to reflect this change. See also https://github.com/github/renaming
Build Status (main
branch)
Build | Status |
---|---|
GitHub Actions | |
Azure Pipelines | |
Azure Pipelines (Exhaustive Tests) | |
Azure Pipelines (Valgrind ICU4C) | |
Fuzzing |
Subdirectories and Information
icu4c/
ICU for C/C++icu4j/
ICU for Javatools/
Toolsvendor/
Vendor dependencies
License
Please see ./icu4c/LICENSE (C and J are under an identical license file.)
Copyright © 2016 and later Unicode, Inc. and others. All Rights Reserved. Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. Terms of Use and License