mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-15 22:06:32 +00:00
[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:
parent
d78b486414
commit
90a202f2ff
@ -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;
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user