Module |
|
Header |
/Engine/Source/Runtime/Core/Public/Templates/UnrealTemplate.h |
Include |
#include "Templates/UnrealTemplate.h" |
template<typename RefType, typename AssignedType>
struct TGuardValue : private FNoncopyable
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.
Name | Description | |
---|---|---|
|
TGuardValue ( |
Name | Description | |
---|---|---|
|
~TGuardValue() |
Name | Description | ||
---|---|---|---|
|
const Assign... |
operator*() |
Overloaded dereference operator. |