7 template <unsigned Alignment
, unsigned Size
>
8 struct AlignedCharArray
{
9 alignas(Alignment
) char buffer
[Size
];
12 template <typename T1
>
17 template <typename T1
>
19 char arr1
[sizeof(T1
)];
22 template <typename T1
>
23 struct AlignedCharArrayUnion
24 : AlignedCharArray
<alignof(AlignerImpl
<T1
>), sizeof(SizerImpl
<T1
>)> {};
26 template <typename T
, unsigned N
>
27 struct SmallVectorStorage
{
28 AlignedCharArrayUnion
<T
> InlineElts
[N
];
30 template <typename T
, unsigned N
>
31 class SmallVector
: SmallVectorStorage
<T
, N
> {};
34 struct OptionalStorage
{
35 AlignedCharArrayUnion
<T
> storage
;
39 OptionalStorage
<T
> Storage
;