[*] Minor tube inspection

This commit is contained in:
Reece Wilson 2022-03-25 19:33:54 +00:00
parent 7d9f1abfe3
commit 438a63f17a
2 changed files with 11 additions and 2 deletions

View File

@ -191,6 +191,15 @@ static AuUInt8 AuPopCnt(T in)
}
#endif
if constexpr (sizeof(T) == sizeof(AuUInt16))
{
return AuPopCnt<AuUInt32>(in);
}
else if constexpr (sizeof(T) == sizeof(AuUInt16))
{
return AuPopCnt<AuUInt32>(in);
}
return {};
}

View File

@ -10,7 +10,7 @@
template<typename T, typename ... Args>
inline T AuTryConstruct(AuCtorCode_t &status, Args&& ... args)
{
if constexpr (AuIsConstructible<T, bool &, Args ...>::type::value)
if constexpr (AuIsConstructible<T, AuCtorCode_t &, Args ...>::type::value)
{
status = AuCtorCode_t::Failed();
return T(status, AuForward<T>(args)...);
@ -41,7 +41,7 @@ inline AuPair<AuCtorCode_t, T> AuTryConstructPair(Args&& ... args)
template<typename T, typename ... Args>
inline T AuTryConstructWithDefault(AuCtorCode_t &status, T &&def, Args&& ... args)
{
if constexpr (AuIsConstructible<T, bool &, Args ...>::type::value)
if constexpr (AuIsConstructible<T, AuCtorCode_t &, Args ...>::type::value)
{
status = AuCtorCode_t::Failed();
T returnValue = T(status, AuForward<T>(args)...);