refactor(templates): refactor GetTypeHash and Swap to friend

This commit is contained in:
2022-12-19 18:00:52 +08:00
parent de059cb980
commit b75cb30f4f
8 changed files with 86 additions and 136 deletions

View File

@ -47,9 +47,9 @@ public:
return Invoke(Get(), Forward<Ts>(Args)...);
}
FORCEINLINE constexpr size_t GetTypeHash() const requires (CHashable<ReferencedType>)
friend FORCEINLINE constexpr size_t GetTypeHash(TReferenceWrapper A) requires (CHashable<ReferencedType>)
{
return NAMESPACE_REDCRAFT::GetTypeHash(Get());
return GetTypeHash(A.Get());
}
private: