LLVM 20.0.0git
|
A suitably aligned and sized character array member which can hold elements of any type. More...
#include "llvm/Support/AlignOf.h"
Public Types | |
using | AlignedUnion = std::aligned_union_t< 1, T, Ts... > |
Public Attributes | |
char | buffer [sizeof(AlignedUnion)] |
A suitably aligned and sized character array member which can hold elements of any type.
This template is equivalent to std::aligned_union_t<1, ...>, but we cannot use it due to a bug in the MSVC x86 compiler: https://github.com/microsoft/STL/issues/1533 Using alignas
here works around the bug.
using llvm::AlignedCharArrayUnion< T, Ts >::AlignedUnion = std::aligned_union_t<1, T, Ts...> |
char llvm::AlignedCharArrayUnion< T, Ts >::buffer[sizeof(AlignedUnion)] |