diff options
Diffstat (limited to 'include/fud_assert.hpp')
-rw-r--r-- | include/fud_assert.hpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/include/fud_assert.hpp b/include/fud_assert.hpp index fd861ea..8caf751 100644 --- a/include/fud_assert.hpp +++ b/include/fud_assert.hpp @@ -20,11 +20,15 @@ namespace fud { -void assertFail(const char* assertion, const char* file, unsigned int line, const char* function) noexcept(false) - __attribute__((__noreturn__)); +// clang-format off +[[noreturn]] void assertFail( + const char* assertion, + const char* file, + unsigned int line, + const char* function) noexcept(false); +// clang-format on -#define fudAssert(expr) \ - ((expr) ? static_cast<void>(0) : assertFail(#expr, __FILE__, __LINE__, __PRETTY_FUNCTION__)) +#define fudAssert(expr) ((expr) ? static_cast<void>(0) : assertFail(#expr, __FILE__, __LINE__, __PRETTY_FUNCTION__)) } // namespace fud |