std::aligned_union
来自cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| Defined in header <type_traits>
|
||
| template< std::size_t Len, class... Types > struct aligned_union; |
(C++11 起) | |
提供的的成员typedef
type,这是一个POD类型适合用作未初始化的存储,一个目的的任何类型中列出Types正确对齐。所述存储的大小是至少Len。 std::aligned_union也决定了严格的(最大)之间的对齐要求所有Types,使得它可以作为不断alignment_value.Original:
Provides the member typedef
type, which is a POD type suitable for use as uninitialized storage, correctly aligned for an object of any of the types listed in Types. The size of the storage is at least Len. std::aligned_union also determines the strictest (largest) alignment requirement among all Types and makes it available as the constant alignment_value.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
目录 |
[编辑] 会员类型
| 姓名
Original: Name The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
type
|
的POD类型适用于存储的任何种类的
Types Original: the POD type suitable for storage of any type from Types The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[编辑] 会员常数
| alignment_value [静态的] </ SPAN></div></div>
|
最严格的对齐要求所有 Types Original: the strictest alignment requirement of all Types The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共静态成员常量) |
[编辑] 为例
| 本节是不完整的 原因: no example |
[编辑] 另请参阅
| (C++11) |
获得该类型的对齐要求 Original: obtains the type's alignment requirements The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (类模板) |
| (C++11) |
定义的类型适合用作未初始化的存储类型的给定尺寸 Original: defines the type suitable for use as uninitialized storage for types of given size The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (类模板) |