Navigation
API > API/Runtime > API/Runtime/Core
Description
Check if Flags has one and only one flag set. This can also be thought of as a check for a power-of-2 value.
| Name | EnumHasOneFlag |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Misc/EnumClassFlags.h |
| Include Path | #include "Misc/EnumClassFlags.h" |
template<typename Enum >
bool EnumHasOneFlag
(
Enum Flags
)
true if Flags has only one flag set. false otherwise.
Parameters
| Name | Remarks |
|---|---|
| Flags | The value to check. |