engine
 
载入中...
搜索中...
未找到
所有成员列表
TMoveSupportTraits< T > 模板结构体 参考

This traits class is intended to be used in pairs to allow efficient and correct move-aware overloads for generic types. 更多...

#include <UnrealTypeTraits.h>

继承自 TMoveSupportTraitsBase< T, U > .

详细描述

template<typename T>
struct TMoveSupportTraits< T >

This traits class is intended to be used in pairs to allow efficient and correct move-aware overloads for generic types.

For example:

template <typename T> void Func(typename TMoveSupportTraits<T>::Copy Obj) { // Copy Obj here }

template <typename T> void Func(typename TMoveSupportTraits<T>::Move Obj) { // Move from Obj here as if it was passed as T&& }

Structuring things in this way will handle T being a pass-by-value type (e.g. ints, floats, other 'small' types) which should never have a reference overload.


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