mirror of
https://github.com/matrix-construct/construct
synced 2024-11-19 00:10:59 +01:00
ircd: Complete the assert workaround for clang.
This commit is contained in:
parent
c3f0803e49
commit
c63141c4dc
1 changed files with 9 additions and 3 deletions
|
@ -109,9 +109,15 @@ extern "C"
|
||||||
#undef major
|
#undef major
|
||||||
#undef minor
|
#undef minor
|
||||||
|
|
||||||
// Trouble. clang++-8
|
// Trouble; clang.
|
||||||
#ifndef assert
|
#if defined(__clang__) && !defined(assert)
|
||||||
#define assert(expr) (static_cast<void>(0))
|
#ifdef NDEBUG
|
||||||
|
#define assert(expr) \
|
||||||
|
(static_cast<void>(0))
|
||||||
|
#else
|
||||||
|
#define assert(expr) \
|
||||||
|
(static_cast<bool>(expr)? void(0): __assert_fail(#expr, __FILE__, __LINE__, __FUNCTION__))
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////>
|
//////////////////////////////////////////////////////////////////////////////>
|
||||||
|
|
Loading…
Reference in a new issue