diff --git a/include/bx/inline/bx.inl b/include/bx/inline/bx.inl index e8019fe..b54e8dd 100644 --- a/include/bx/inline/bx.inl +++ b/include/bx/inline/bx.inl @@ -16,19 +16,13 @@ namespace bx char(&CountOfRequireArrayArgumentT(const Ty(&)[Num]))[Num]; template - inline constexpr bool isEnabled() + BX_FORCE_INLINE constexpr bool isEnabled() { return true; } - template - inline constexpr bool isTriviallyCopyable() - { - return __is_trivially_copyable(Ty); - } - template<> - inline constexpr bool isEnabled() + BX_FORCE_INLINE constexpr bool isEnabled() { return false; } @@ -38,6 +32,12 @@ namespace bx return _x; } + template + inline constexpr bool isTriviallyCopyable() + { + return __is_trivially_copyable(Ty); + } + template inline void swap(Ty& _a, Ty& _b) { diff --git a/include/bx/macros.h b/include/bx/macros.h index 801c49f..f4a003b 100644 --- a/include/bx/macros.h +++ b/include/bx/macros.h @@ -3,11 +3,13 @@ * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#ifndef BX_H_HEADER_GUARD +# error "Do not include macros.h directly #include instead." +#endif // BX_H_HEADER_GUARD + #ifndef BX_MACROS_H_HEADER_GUARD #define BX_MACROS_H_HEADER_GUARD -#include "bx.h" - /// #if BX_COMPILER_MSVC // Workaround MSVS bug...