diff --git a/include/bx/bx.h b/include/bx/bx.h index 099dc33..5e0f981 100644 --- a/include/bx/bx.h +++ b/include/bx/bx.h @@ -38,15 +38,15 @@ namespace bx { /// Returns true if type `Ty` is trivially copyable / POD type. - template + template constexpr bool isTriviallyCopyable(); /// Find the address of an object of a class that has an overloaded unary ampersand (&) operator. - template + template Ty* addressOf(Ty& _a); /// Find the address of an object of a class that has an overloaded unary ampersand (&) operator. - template + template const Ty* addressOf(const Ty& _a); /// diff --git a/include/bx/inline/bx.inl b/include/bx/inline/bx.inl index 1639d77..52c9a58 100644 --- a/include/bx/inline/bx.inl +++ b/include/bx/inline/bx.inl @@ -27,13 +27,13 @@ namespace bx return _x; } - template + template inline constexpr bool isTriviallyCopyable() { return __is_trivially_copyable(Ty); } - template + template inline Ty* addressOf(Ty& _a) { return reinterpret_cast( @@ -43,7 +43,7 @@ namespace bx ); } - template + template inline const Ty* addressOf(const Ty& _a) { return reinterpret_cast( @@ -71,20 +71,20 @@ namespace bx Ty tmp = _a; _a = _b; _b = tmp; } - template + template struct IsSignedT { static constexpr bool value = Ty(-1) < Ty(0); }; - template::value> + template::value> struct Limits; - template + template struct Limits { static constexpr Ty max = ( ( (Ty(1) << ( (sizeof(Ty) * 8) - 2) ) - Ty(1) ) << 1) | Ty(1); static constexpr Ty min = -max - Ty(1); }; - template + template struct Limits { static constexpr Ty min = 0;