Skip to content

num::make_aligned

Defined in header <container/util/aligned_storage.hpp>

template <class T>
aligned_array<T> make_aligned(idx count);

Allocate count value-initialized elements on an aligned boundary.

Equivalent to new T[count](), except for the alignment and the overflow check.

Exceptions

  • std::bad_alloc: On overflow or allocation failure.