std::max_align_t
提供: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 <cstddef>
|
||
| typedef /*implementation-defined*/ max_align_t; |
(C + + 11以来) | |
std::max_align_tそのアラインメント要件ごとにスカラー型のものと(大きさ)は、少なくとも限り厳しくなってPOD型です.
Original:
std::max_align_t is a POD type whose alignment requirement is at least as strict (as large) as that of every scalar type.
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.
[編集] ノート
そのようなstd::mallocとして割り当て関数によって返されるポインタは、適宜任意のオブジェクトの整列され、それは彼らが少なくともstd::max_align_t同じくらい厳しく整列していることを意味.
Original:
Pointers returned by allocation functions such as std::malloc are suitably aligned for any object, which means they are aligned at least as strict as std::max_align_t.
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.
std::max_align_tほとんどのプラットフォームでlong doubleで最大のスカラー型と通常同義であり、その整列要件が8または16です.
Original:
std::max_align_t is usually synonymous with the largest scalar type, which is long double on most platforms, and its alignment requirement is either 8 or 16.
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.
[編集] 例
#include <iostream> #include <cstddef> int main() { std::cout << alignof(std::max_align_t) << '\n'; }
Output:
16
[編集] も参照してください
| alignof operator | queries alignment requirements of a type (C + + 11以来) |
| (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: checks if a type is scalar type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |