[*] Update casts again

This commit is contained in:
Reece Wilson 2022-05-21 00:51:05 +01:00
parent ea336826dd
commit 6e8c87edd4

View File

@ -43,7 +43,7 @@ static constexpr T AuStaticCast(Z other)
return static_cast<T>(other);
}
template <class T, class Z>
template <class T, class Z, AU_TEMPLATE_ENABLE_WHEN(!AuIsBaseOfTemplate_v<AURORA_RUNTIME_AU_SHARED_PTR, Z> &&AuIsRValueReference_v<Z>)>
static constexpr AuConditional_t<AuIsPointer_v<T>, T, T *> AuConstCast(Z *other)
{
return const_cast<AuConditional_t<AuIsPointer_v<T>, T, T *>>(other);
@ -74,9 +74,9 @@ static constexpr AuSPtr<T> AuConstCast(AuSPtr<Z> &&other)
}
template <class T, class Z>
static constexpr AuConditional_t<AuIsClass_v<T> && !AuIsPointer_v<T> && AuIsPointer_v<Z>, T *, T> AuReinterpretCast(Z other)
static constexpr AuConditional_t<AuIsClass_v<T> && !AuIsPointer_v<T> && !AuIsReference_v<Z>, T *, T> AuReinterpretCast(Z other)
{
return reinterpret_cast<AuConditional_t<AuIsClass_v<T> && !AuIsPointer_v<T> &&AuIsPointer_v<Z>, T *, T>>(other);
return reinterpret_cast<AuConditional_t<AuIsClass_v<T> && !AuIsPointer_v<T> && !AuIsReference_v<Z>, T *, T>>(other);
}
template <class T, class Z>