This commit is contained in:
Бранимир Караџић
2020-04-10 21:12:19 -07:00
parent 936327aa0f
commit 927a02a3a1
2 changed files with 12 additions and 10 deletions

View File

@@ -16,19 +16,13 @@ namespace bx
char(&CountOfRequireArrayArgumentT(const Ty(&)[Num]))[Num];
template<bool>
inline constexpr bool isEnabled()
BX_FORCE_INLINE constexpr bool isEnabled()
{
return true;
}
template<class Ty>
inline constexpr bool isTriviallyCopyable()
{
return __is_trivially_copyable(Ty);
}
template<>
inline constexpr bool isEnabled<false>()
BX_FORCE_INLINE constexpr bool isEnabled<false>()
{
return false;
}
@@ -38,6 +32,12 @@ namespace bx
return _x;
}
template<class Ty>
inline constexpr bool isTriviallyCopyable()
{
return __is_trivially_copyable(Ty);
}
template<typename Ty>
inline void swap(Ty& _a, Ty& _b)
{

View File

@@ -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 <bx/bx.h> 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...