diff --git a/Redcraft.Utility/Source/Public/Templates/ReferenceWrapper.h b/Redcraft.Utility/Source/Public/Templates/ReferenceWrapper.h index f502631..26eb6ba 100644 --- a/Redcraft.Utility/Source/Public/Templates/ReferenceWrapper.h +++ b/Redcraft.Utility/Source/Public/Templates/ReferenceWrapper.h @@ -40,6 +40,33 @@ private: template TReferenceWrapper(T&) -> TReferenceWrapper; +template +void Ref(const T&&) = delete; + +template +constexpr TReferenceWrapper Ref(T& InValue) +{ + return TReferenceWrapper(InValue); +} + +template +constexpr TReferenceWrapper Ref(TReferenceWrapper InValue) +{ + return Ref(InValue.Get()); +} + +template +constexpr TReferenceWrapper Ref(const T& InValue) +{ + return TReferenceWrapper(InValue); +} + +template +constexpr TReferenceWrapper Ref(TReferenceWrapper InValue) +{ + return Ref(InValue.Get()); +} + template struct TIsTReferenceWrapper : FFalse { }; template struct TIsTReferenceWrapper> : FTrue { };