E.V.E
v2022.09.01

◆ is_aligned() [4/4]

template<std::size_t Alignment, std::integral T>
constexpr bool eve::is_aligned ( v)
constexprnoexcept

Checks if a pointer satisfy an alignment constraint.

Parameters
vIntegral value to check.
Template Parameters
AlignmentAlignment constraint to verify. Behavior is undefined if this constraint is not a power of 2.
Returns
true if ptr is aligned over Alignment, false otherwise.