1 --- a/common/uarrsort.cpp
2 +++ b/common/uarrsort.cpp
3 @@ -37,7 +37,7 @@ enum {
6 static constexpr int32_t sizeInMaxAlignTs(int32_t sizeInBytes) {
7 - return (sizeInBytes + sizeof(std::max_align_t) - 1) / sizeof(std::max_align_t);
8 + return (sizeInBytes + sizeof(max_align_t) - 1) / sizeof(max_align_t);
11 /* UComparator convenience implementations ---------------------------------- */
12 @@ -141,7 +141,7 @@ static void
13 insertionSort(char *array, int32_t length, int32_t itemSize,
14 UComparator *cmp, const void *context, UErrorCode *pErrorCode) {
16 - icu::MaybeStackArray<std::max_align_t, sizeInMaxAlignTs(STACK_ITEM_SIZE)> v;
17 + icu::MaybeStackArray<max_align_t, sizeInMaxAlignTs(STACK_ITEM_SIZE)> v;
18 if (sizeInMaxAlignTs(itemSize) > v.getCapacity() &&
19 v.resize(sizeInMaxAlignTs(itemSize)) == nullptr) {
20 *pErrorCode = U_MEMORY_ALLOCATION_ERROR;
21 @@ -235,7 +235,7 @@ static void
22 quickSort(char *array, int32_t length, int32_t itemSize,
23 UComparator *cmp, const void *context, UErrorCode *pErrorCode) {
24 /* allocate two intermediate item variables (x and w) */
25 - icu::MaybeStackArray<std::max_align_t, sizeInMaxAlignTs(STACK_ITEM_SIZE) * 2> xw;
26 + icu::MaybeStackArray<max_align_t, sizeInMaxAlignTs(STACK_ITEM_SIZE) * 2> xw;
27 if(sizeInMaxAlignTs(itemSize)*2 > xw.getCapacity() &&
28 xw.resize(sizeInMaxAlignTs(itemSize) * 2) == nullptr) {
29 *pErrorCode=U_MEMORY_ALLOCATION_ERROR;
30 --- a/common/utext.cpp
31 +++ b/common/utext.cpp
32 @@ -569,7 +569,7 @@ enum {
34 struct ExtendedUText {
36 - std::max_align_t extension;
37 + max_align_t extension;
40 static const UText emptyText = UTEXT_INITIALIZER;
41 @@ -584,7 +584,7 @@ utext_setup(UText *ut, int32_t extraSpac
42 // We need to heap-allocate storage for the new UText
43 int32_t spaceRequired = sizeof(UText);
45 - spaceRequired = sizeof(ExtendedUText) + extraSpace - sizeof(std::max_align_t);
46 + spaceRequired = sizeof(ExtendedUText) + extraSpace - sizeof(max_align_t);
48 ut = (UText *)uprv_malloc(spaceRequired);
50 --- a/tools/toolutil/toolutil.cpp
51 +++ b/tools/toolutil/toolutil.cpp
52 @@ -266,7 +266,7 @@ struct UToolMemory {
54 int32_t capacity, maxCapacity, size, idx;
56 - alignas(std::max_align_t) char staticArray[1];
57 + alignas(max_align_t) char staticArray[1];
60 U_CAPI UToolMemory * U_EXPORT2