WPILibC++ 2023.4.3-108-ge5452e3
|
A suitably aligned and sized character array member which can hold elements of any type. More...
#include </home/runner/work/allwpilib/allwpilib/wpiutil/src/main/native/thirdparty/llvm/include/wpi/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 wpi::AlignedCharArrayUnion< T, Ts >::AlignedUnion = std::aligned_union_t<1, T, Ts...> |
char wpi::AlignedCharArrayUnion< T, Ts >::buffer[sizeof(AlignedUnion)] |