mirror of
https://github.com/matrix-construct/construct
synced 2024-12-27 07:54:05 +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 minor
|
||||
|
||||
// Trouble. clang++-8
|
||||
#ifndef assert
|
||||
#define assert(expr) (static_cast<void>(0))
|
||||
// Trouble; clang.
|
||||
#if defined(__clang__) && !defined(assert)
|
||||
#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
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////>
|
||||
|
|
Loading…
Reference in a new issue