|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Defined in header <new> | ||
enumclass align_val_t:std::size_t{}; | (since C++17) | |
Bothnew-expression anddelete-expression, when used with objects whose alignment requirement is greater than__STDCPP_DEFAULT_NEW_ALIGNMENT__, pass that alignment requirement as an argument of typestd::align_val_t to the selected allocation/deallocation function.
Alignment (as obtained byalignof) has the typestd::size_t, but placement forms of allocation and deallocation functions that takestd::size_t as an additional parameter are already in use, so this type is used instead.
| Feature-test macro | Value | Std | Feature |
|---|---|---|---|
__cpp_aligned_new | 201606L | (C++17) | Dynamic memory allocation for over-aligned data |
| allocation functions (function)[edit] | |
| deallocation functions (function)[edit] |