#pragma once extern void __assert_fail (const char *__assertion, const char *__file, unsigned int __line, const char *__function) __attribute__ ((__noreturn__)); #define __ASSERT_FUNCTION __func__ #define assert(expr) \ ({ \ if (!(expr)) \ __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION); \ }) #define fail(expr) \ (__assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION);)