IsAligned

Checks if a pointer is aligned to the specified alignment.

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Templates/AlignmentTemplates.h

Include

#include "Templates/AlignmentTemplates.h"

Syntax

template<typename T>
constexpr bool IsAligned
(
    T Val,
    uint64 Alignment
)

Remarks

Checks if a pointer is aligned to the specified alignment.

Returns

true if the pointer is aligned to the specified alignment, false otherwise.

Parameters

Parameter

Description

Val

The value to align.

Alignment

The alignment value, must be a power of two.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss