![]() |
Raven Engine v0.1
|
Compile-time traits for determining allocation strategy of T. More...
#include <AllocatorTraits.h>
Static Public Attributes | |
| static constexpr bool | UseStack = sizeof(T) <= 32 && alignof(T) <= alignof(max_align) |
| True if T can be safely allocated on the stack. | |
| static constexpr bool | UsePool = !UseStack && sizeof(T) > 32 |
| True if T should be allocated from a memory pool. | |
Compile-time traits for determining allocation strategy of T.
Determines whether instances of type T should be allocated on the stack (for small, properly aligned types) or from a pool (for larger types).
| T | The type to evaluate. |
|
staticconstexpr |
True if T should be allocated from a memory pool.
Evaluates to true when UseStack is false and sizeof(T) > 32.
|
staticconstexpr |
True if T can be safely allocated on the stack.
Evaluates to true when sizeof(T) <= 32 and alignment of T does not exceed the maximum fundamental alignment.