.TH "std::aligned_storage< _Len, _Align >" 3 "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::aligned_storage< _Len, _Align > \- Aligned storage\&. .SH SYNOPSIS .br .PP .PP \fR#include \fP .SH "Detailed Description" .PP .SS "template .br struct std::aligned_storage< _Len, _Align >"Aligned storage\&. The member typedef \fRtype\fP is be a POD type suitable for use as uninitialized storage for any object whose size is at most \fR_Len\fP and whose alignment is a divisor of \fR_Align\fP\&. .PP It is important to use the nested \fRtype\fP as uninitialized storage, not the \fRstd::aligned_storage\fP type itself which is an empty class with 1-byte alignment\&. So this is correct: .PP \fRtypename std::aligned_storage::type m_xobj;\fP .PP This is wrong: .PP \fRstd::aligned_storage m_xobj;\fP .PP In C++14 and later \fRstd::aligned_storage_t\fP can be used to refer to the \fRtype\fP member typedef\&. .PP The default value of _Align is supposed to be the most stringent fundamental alignment requirement for any C++ object type whose size is no greater than \fR_Len\fP (see [basic\&.align] in the C++ standard)\&. .PP \fBDeprecated\fP .RS 4 Deprecated in C++23\&. Uses can be replaced by an array \fRstd::byte[_Len]\fP declared with \fRalignas(_Align)\fP\&. .RE .PP .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.