[*] Update auStaticCast

[*] Fix typename: auAddRemoveCV_t -> auRemoveCV_t
This commit is contained in:
Reece Wilson 2022-05-02 18:16:52 +01:00
parent 70d13963be
commit ea336826dd
2 changed files with 7 additions and 7 deletions

View File

@ -25,19 +25,19 @@ static constexpr AuConditional_t<AuIsPointer_v<T>, T, T *> AuStaticCast(Z *other
return static_cast<AuConditional_t<AuIsPointer_v<T>, T, T *>>(other);
}
template <class T, class Z, AU_TEMPLATE_ENABLE_WHEN(!AuIsBaseOfTemplate_v<AURORA_RUNTIME_AU_SHARED_PTR, Z>)>
static constexpr AuConditional_t<AuIsReference_v<T>, T, T &> AuStaticCast(Z &other)
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)
{
return static_cast<AuConditional_t<AuIsReference_v<T>, T, T &>>(AuForward(other));
}
template <class T, class Z, AU_TEMPLATE_ENABLE_WHEN(!AuIsBaseOfTemplate_v<AURORA_RUNTIME_AU_SHARED_PTR, Z>)>
static constexpr AuConditional_t<AuIsReference_v<T>, T, T &&> AuStaticCast(Z &&other)
template <class T, class Z, AU_TEMPLATE_ENABLE_WHEN(!AuIsBaseOfTemplate_v<AURORA_RUNTIME_AU_SHARED_PTR, Z> && AuIsRValueReference_v<Z>)>
static constexpr AuConditional_t<AuIsReference_v<T>, T, T &&> AuStaticCast(Z other)
{
return static_cast<AuConditional_t<AuIsReference_v<T>, T, T &&>>(AuMove(other));
}
template <class T, class Z, AU_TEMPLATE_ENABLE_WHEN(!AuIsPointer_v<T> && !AuIsPointer_v<Z>)>
template <class T, class Z, AU_TEMPLATE_ENABLE_WHEN(!AuIsPointer_v<Z> && !AuIsReference_v<Z>)>
static constexpr T AuStaticCast(Z other)
{
return static_cast<T>(other);

View File

@ -250,7 +250,7 @@ template <class T>
using AuAddConst_t = typename AuAddConst<T>::type;
template <class T>
using AuAddRemoveCV_t = AuRemoveConst_t<AuRemoveReference_t<T>>;
using AuRemoveCV_t = AuRemoveConst_t<AuRemoveReference_t<T>>;
template <class T>
struct AuRemoveExtent
@ -321,7 +321,7 @@ using AuDecay_t = AuConditional_t<
AuConditional_t<
AuIsFunction_v<T>,
AuAddPointer_t<T>,
AuAddRemoveCV_t<T>
AuRemoveCV_t<T>
>
>;