std::align_val_t

From cppreference.com
< cpp‎ | memory‎ | new
 
 
 
Dynamic memory management
Uninitialized storage
(C++17)
(deprecated since c++17)
(deprecated since c++17)
(deprecated since c++17)
Garbage collection support
(C++11)
Miscellaneous
(C++11)
(C++11)
(C++11)
C Library
Low level memory management
 
 
Defined in header <new>
enum class align_val_t : std::size_t {};
(since C++17)

Both new-expression and delete-expression, when used with objects whose alignment requirement is greater than __STDCPP_DEFAULT_NEW_ALIGNMENT__, pass that alignment requirement as an argument of type std::align_val_t to the selected allocation/deallocation function.

[edit] Notes

Alignment (as obtained by alignof) has the type std::size_t, but placement forms of allocation and deallocation functions that take std::size_t as an additional parameter are already in use, so this type is used instead.

[edit] See also

allocation functions
(function)
deallocation functions
(function)
This site archives manuals. You are looking at an archived manual.
If you're looking for this specific version of this manual, you're in the right place. Otherwise, please check the version.