You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
264 B
C

#include <stdio.h>
static inline void assert_impl(bool cond, const char *expression)
{
if(!cond)
{
fprintf(stderr, "Assertion failed: %s\n", expression);
__debugbreak();
}
}
#ifdef assert
#undef assert
#endif
#define assert(cond) assert_impl(cond, #cond)