Module helpers

Source
Expand description

Helpers which tend to be useful in other libraries as well.

Structs§

AllocGuard
A RAII guard that owns a single allocation and ensures it is deallocated unless explicitly released.
SliceAllocGuard
A RAII guard for a heap‐allocated slice that tracks how many elements have been initialized.

Functions§

layout_or_sz_align
Gets either a valid layout with space for n count of T, or a raw size and alignment.