This repository has been archived on 2025-02-26. You can view files and clone it, but cannot push or open issues or pull requests.
hilbert-os/libraries/euler/include/cassert
2024-01-20 17:59:40 -05:00

13 lines
332 B
Text

#pragma once
namespace euler {
[[noreturn]] void assert_failed(
const char *file, const char *function, int line, const char *condition);
}
#ifdef NDEBUG
#define assert(condition) ((void)0)
#else
#define assert(condition) ((condition) ? ((void)0) : \
euler::assert_failed(__FILE__, __func__, __LINE__, #condition))
#endif