Returns the next integer (mod 2**nbits) that is greater than or equal to Value and is a multiple of Align. Align must be non‐zero.

Synopsis

Declared in <llvm/Support/MathExtras.h>

template<
    auto Align,
    typename V,
    typename T = common_uint<decltype(Align), V>>
constexpr
T
alignTo(V Value);

Description

Will overflow only if result is not representable in T.

Return Value

Value rounded up to the next multiple of Align.

Parameters

Name

Description

Value

Value to align upward.

Created with MrDocs