Dear ICU users,
In ICU 50, we have attempted to define UChar=char16_t when possible,
similar to how we otherwise use wchar_t or else uint16_t.
However, this has broken several users' builds because in C++ the char16_t
is distinct from uint16_t/wchar_t even if it otherwise behaves the same.
I have checked in a fix under ticket
changes back to not automatically defining UChar=char16_t. It adds the
ability to optionally define a custom UCHAR_TYPE.
As a side effect, because u"abc" string literals have type char16_t* but it
can be UChar!=char16_ I had to change the U_STRING_DECL
that it does not always declare an array any more; in some cases it
declares a pointer variable, which allows a pointer type cast. (We cannot
initialize a UChar *array* with a char16_t string literal when
If you have code that relies on the U_STRING_DECL macro defining an array
variable, then it might break, depending on the platform. You would need to
change your code so that it works with either a pointer or an array.
We believe that this is very rare. In ICU, there was only the U_STRING_DECL
unit test itself that relied on the array variable.
Please let us know if this causes major problems.
Google Internationalization Engineering