Skip to content
Snippets Groups Projects
Commit 9f6af1a0 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Merge branch 'develop' into feature/mpi

parents 4d3c7301 78e2cd1d
No related branches found
No related tags found
1 merge request!11Feature/mpi
......@@ -45,15 +45,25 @@ class AssertError
~AssertError() = default;
};
#pragma GCC diagnostic ignored "-Wattributes"
inline bool
__attribute__((analyzer_noreturn))
_pastis_assert(const bool& assert)
{
return assert;
}
#pragma GCC diagnostic pop
#ifdef NDEBUG
// Useless test is there to check syntax even in optimized mode. Costs nothing.
#define Assert(assertion) if (not (assertion)) {}
#define Assert(assertion) \
if (not _pastis_assert(assertion)) {}
#else // NDEBUG
#define Assert(assertion) \
if (not (assertion)) { \
if (not _pastis_assert(assertion)) { \
throw AssertError(__FILE__, \
__LINE__, \
__PRETTY_FUNCTION__, \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment