engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
TGuardValue< RefType, AssignedType > 模板结构体 参考

exception-safe guard around saving/restoring a value. 更多...

#include <UnrealTemplate.h>

+ 类 TGuardValue< RefType, AssignedType > 继承关系图:

Public 成员函数

FORCEINLINE const AssignedType & operator* () const
 Overloaded dereference operator. 更多...
 

详细描述

template<typename RefType, typename AssignedType = RefType>
struct TGuardValue< RefType, AssignedType >

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.

成员函数说明

◆ operator*()

template<typename RefType , typename AssignedType = RefType>
FORCEINLINE const AssignedType & TGuardValue< RefType, AssignedType >::operator* ( ) const
inline

Overloaded dereference operator.

Provides read-only access to the original value of the data being tracked by this struct

返回
a const reference to the original data value

该结构体的文档由以下文件生成: