Document aligned_storage and use alignment_of_v.

This commit is contained in:
Sadie Powell 2022-01-31 13:16:57 +00:00
parent d247b77a1e
commit c9bc8f01e3

View File

@ -24,13 +24,13 @@ namespace insp
template <typename T> class aligned_storage;
}
/** */
/** A block of preallocated memory which an object can be created into. */
template <typename T>
class insp::aligned_storage final
{
private:
/** The underlying aligned storage block. */
mutable typename std::aligned_storage<sizeof(T), std::alignment_of<T>::value>::type data;
mutable typename std::aligned_storage<sizeof(T), std::alignment_of_v<T>>::type data;
public:
/** Default constructor for the aligned_storage class. */