From a6ea29dcd7c6f74be1ddf73a810e840faa68dd7f Mon Sep 17 00:00:00 2001 From: Stephane Del Pino <stephane.delpino44@gmail.com> Date: Sun, 22 Jul 2018 00:48:30 +0200 Subject: [PATCH] Add NO_ASSERT macro which defines is Assert actually do something It is valued to true of false --- src/utils/PastisAssert.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/utils/PastisAssert.hpp b/src/utils/PastisAssert.hpp index 90cfe1599..9f5a171ac 100644 --- a/src/utils/PastisAssert.hpp +++ b/src/utils/PastisAssert.hpp @@ -62,4 +62,12 @@ class AssertError #endif // NDEBUG +// stores the current state of Assert macro. This is useful for instance to +// noexcept management of Assert throws +#ifdef NDEBUG +#define NO_ASSERT true +#else // NDEBUG +#define NO_ASSERT false +#endif // NDEBUG + #endif // PASTIS_ASSERT_HPP -- GitLab