5 #define NOP static_cast<void>(nullptr)
11 #ifdef TARGET_OS_WINDOWS
12 #define BREAK __debugbreak()
13 #elif defined(TARGET_OS_MAC)
14 #define BREAK __builtin_trap()
16 #define BREAK __asm__("int3")
24 #ifdef TARGET_OS_WINDOWS
25 #define UNREACHABLE __assume(false)
27 #define UNREACHABLE __builtin_unreachable()
31 #define UNIMPLEMENTED CYB::API::Assert::Unimplemented(__FUNCTION__, __FILE__, __LINE__)
43 static void HCF[[noreturn]](void) noexcept;
52 static void Unimplemented(
const char*
const AFunction,
const char*
const AFile,
const unsigned int ALine) noexcept;
59 static void True(
const bool AExpression) noexcept;
66 static void False(
const bool AExpression) noexcept;
75 template <
typename AType>
static void Equal(
const AType& ALHS,
const AType& ARHS) noexcept;
86 template <
typename AType,
typename... AOtherTypes>
static void Equal(
const AType& ALHS,
const AType& ARHS, AOtherTypes&&... ARHSs) noexcept;
95 template <
typename AType>
static void NotEqual(
const AType& ALHS,
const AType& ARHS) noexcept;
104 template <
typename AType>
static void LessThan(
const AType& ALHS,
const AType& ARHS) noexcept;
113 template <
typename AType>
static void LessThanOrEqual(
const AType& ALHS,
const AType& ARHS) noexcept;
117 #include "Assert.inl"
static void True(const bool AExpression) noexcept
Assertion function. AExpression should always be evaluated.
static void Unimplemented(const char *const AFunction, const char *const AFile, const unsigned int ALine) noexcept
Indicates an unimplemented function, calls HCF if ASSERTION_OVERRIDE is not defined.
static void LessThan(const AType &ALHS, const AType &ARHS) noexcept
Less than assertion function. May not be evaluated.
static void NotEqual(const AType &ALHS, const AType &ARHS) noexcept
Unequivalence assertion function. May not be evaluated.
static void HCF(void) noexcept
Indicates unreachable code. Implementation can be overriden by defining ASSERTION_OVERRIDE.
static void Equal(const AType &ALHS, const AType &ARHS) noexcept
Equivalence assertion function. May not be evaluated.
static void False(const bool AExpression) noexcept
False assertion function. AExpression should always be evaluated.
Contains assertion functions.
static void LessThanOrEqual(const AType &ALHS, const AType &ARHS) noexcept
Less than or equal assertion function. May not be evaluated.