[*] Updated: "auCastUtils.hpp [*] Update casts again 2 years ago"
This commit is contained in:
parent
040f9bb99e
commit
c5780976a1
@ -25,6 +25,12 @@ static constexpr AuConditional_t<AuIsPointer_v<T>, T, T *> AuStaticCast(Z *other
|
|||||||
return static_cast<AuConditional_t<AuIsPointer_v<T>, T, T *>>(other);
|
return static_cast<AuConditional_t<AuIsPointer_v<T>, T, T *>>(other);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <class T, class Z>
|
||||||
|
static constexpr AuConditional_t<AuIsPointer_v<T>, const AuRemoveConst_t<T>, const AuRemoveConst_t<T> *> AuStaticCast(const Z *other)
|
||||||
|
{
|
||||||
|
return static_cast<AuConditional_t<AuIsPointer_v<T>, const AuRemoveConst_t<T>, const AuRemoveConst_t<T> *>>(other);
|
||||||
|
}
|
||||||
|
|
||||||
template <class T, class Z, AU_TEMPLATE_ENABLE_WHEN(!AuIsBaseOfTemplate_v<AURORA_RUNTIME_AU_SHARED_PTR, Z> && AuIsLValueReference_v<Z>)>
|
template <class T, class Z, AU_TEMPLATE_ENABLE_WHEN(!AuIsBaseOfTemplate_v<AURORA_RUNTIME_AU_SHARED_PTR, Z> && AuIsLValueReference_v<Z>)>
|
||||||
static constexpr AuConditional_t<AuIsReference_v<T>, T, T &> AuStaticCast(Z other)
|
static constexpr AuConditional_t<AuIsReference_v<T>, T, T &> AuStaticCast(Z other)
|
||||||
{
|
{
|
||||||
@ -79,6 +85,12 @@ static constexpr AuConditional_t<AuIsClass_v<T> && !AuIsPointer_v<T> && !AuIsRef
|
|||||||
return reinterpret_cast<AuConditional_t<AuIsClass_v<T> && !AuIsPointer_v<T> && !AuIsReference_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>
|
||||||
|
static constexpr AuConditional_t<AuIsPointer_v<T>, const AuRemoveConst_t<T>, const AuRemoveConst_t<T> *> AuReinterpretCast(const Z *other)
|
||||||
|
{
|
||||||
|
return reinterpret_cast<AuConditional_t<AuIsPointer_v<T>, const AuRemoveConst_t<T>, const AuRemoveConst_t<T> *>>(other);
|
||||||
|
}
|
||||||
|
|
||||||
template <class T, class Z>
|
template <class T, class Z>
|
||||||
static constexpr AuSPtr<T> AuReinterpretCast(const AuSPtr<Z> &other)
|
static constexpr AuSPtr<T> AuReinterpretCast(const AuSPtr<Z> &other)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user