[cpp23] Remove usage of std::aligned_union<> in llvm (#135146)

std::aligned_union<> is deprecated in C++23. See more details in the
linked bug.

Bug: https://crbug.com/388068052
This commit is contained in:
Victor Vianna 2025-04-11 21:16:33 +01:00 committed by GitHub
parent d78b486414
commit 90a202f2ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -367,8 +367,8 @@ private:
}
union {
std::aligned_union_t<1, storage_type> TStorage;
std::aligned_union_t<1, error_type> ErrorStorage;
alignas(storage_type) char TStorage[sizeof(storage_type)];
alignas(error_type) char ErrorStorage[sizeof(error_type)];
};
bool HasError : 1;

View File

@ -72,7 +72,7 @@ public:
private:
template <class T> struct AllocValueType {
char Base[TrieContentBaseSize];
std::aligned_union_t<sizeof(T), T> Content;
alignas(T) char Content[sizeof(T)];
};
protected: