fix(templates): fix TReferenceWrapper::operator= no return value

This commit is contained in:
Redstone1024 2024-11-01 23:20:55 +08:00
parent ec2a240c23
commit decd75ec46

View File

@ -39,14 +39,16 @@ public:
: Pointer(InValue.Pointer) : Pointer(InValue.Pointer)
{ } { }
/** Assigns by copying the content of other. */ /** Assigns by copying the content of others. */
FORCEINLINE constexpr TReferenceWrapper& operator=(const TReferenceWrapper&) = default; FORCEINLINE constexpr TReferenceWrapper& operator=(const TReferenceWrapper&) = default;
/** Assigns by copying the content of other. */ /** Assigns by copying the content of others. */
template <typename T = ReferencedType> requires (CConvertibleTo<T&, ReferencedType&>) template <typename T = ReferencedType> requires (CConvertibleTo<T&, ReferencedType&>)
FORCEINLINE constexpr TReferenceWrapper& operator=(const TReferenceWrapper<T>& InValue) FORCEINLINE constexpr TReferenceWrapper& operator=(const TReferenceWrapper<T>& InValue)
{ {
Pointer = InValue.Pointer; Pointer = InValue.Pointer;
return *this;
} }
/** @return The stored reference. */ /** @return The stored reference. */