0
0
Fork 0
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:
Jason Volk 2020-02-12 14:32:18 -08:00
parent c3f0803e49
commit c63141c4dc

View file

@ -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
//////////////////////////////////////////////////////////////////////////////> //////////////////////////////////////////////////////////////////////////////>