![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <UnrealTemplate.h>
Inheritance diagram for TGuardValue< RefType, AssignedType >:Public Member Functions | |
| TGuardValue (RefType &ReferenceValue, const AssignedType &NewValue) | |
| ~TGuardValue () | |
| UE_FORCEINLINE_HINT const AssignedType & | GetOriginalValue () const |
exception-safe guard around saving/restoring a value. Commonly used to make sure a value is restored even if the code early outs in the future. Usage: TGuardValue<bool> GuardSomeBool(bSomeBool, false); // Sets bSomeBool to false, and restores it in dtor.
|
inline |
|
inline |
|
inline |
Provides read-only access to the original value of the data being tracked by this struct