Skip to content

Commit 0f1d46a

Browse files
authored
[cpp23] Remove std::aligned_union in llvm/.../compiler-rt
aligned_union is deprecated in C++23. See more details in the linked bug Bug: https://crbug.com/388068052
1 parent 48d4e61 commit 0f1d46a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler-rt/lib/orc/error.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,8 @@ template <typename T> class ORC_RT_NODISCARD Expected {
367367
}
368368

369369
union {
370-
std::aligned_union_t<1, storage_type> TStorage;
371-
std::aligned_union_t<1, error_type> ErrorStorage;
370+
alignas(storage_type) char TStorage[sizeof(storage_type)];
371+
alignas(error_type) char ErrorStorage[sizeof(error_type)];
372372
};
373373

374374
bool HasError : 1;

0 commit comments

Comments
 (0)