This commit is contained in:
Бранимир Караџић
2022-08-28 14:46:32 -07:00
parent 0ee20c6c83
commit 44b737b5ea

View File

@@ -12,8 +12,8 @@ namespace bx
// Reference(S):
// - https://web.archive.org/web/20181115035420/http://cnicholson.net/2011/01/stupid-c-tricks-a-better-sizeof_array/
//
template<typename Ty, size_t Num>
char(&CountOfRequireArrayArgumentT(const Ty(&)[Num]))[Num];
template<typename Ty, size_t NumT>
char (&CountOfRequireArrayArgumentT(const Ty (&)[NumT]) )[NumT];
template<bool B>
struct isEnabled
@@ -33,6 +33,12 @@ namespace bx
return __is_trivially_copyable(Ty);
}
template<typename Ty>
constexpr bool isSigned()
{
return Ty(-1) < Ty(0);
}
template<typename Ty>
inline Ty* addressOf(Ty& _a)
{
@@ -71,12 +77,6 @@ namespace bx
Ty tmp = _a; _a = _b; _b = tmp;
}
template<typename Ty>
constexpr bool isSigned()
{
return Ty(-1) < Ty(0);
}
template<typename Ty>
struct LimitsT<Ty, true>
{