X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f8446dd01aa71a755c74c9b663ce81490055316b..2cfea93ddbd94debacaf5d7f8adb8e487aa2bb7a:/include/xbt/asserts.hpp diff --git a/include/xbt/asserts.hpp b/include/xbt/asserts.hpp index 5a82ccc4ab..9b50fd22f0 100644 --- a/include/xbt/asserts.hpp +++ b/include/xbt/asserts.hpp @@ -6,12 +6,7 @@ #ifndef SIMGRID_XBT_ASSERTS_HPP #define SIMGRID_XBT_ASSERTS_HPP -#include #include -#include - -namespace simgrid { -namespace xbt { /** * @brief Those are the SimGrid version of the good ol' assert macro. @@ -32,13 +27,9 @@ namespace xbt { #define _xbt_enforce_ARG1(cond) _xbt_enforce_ARGN((cond), "Assertion %s failed", #cond) #define _xbt_enforce_ARGN(cond, ...) \ do { \ - if (!(cond)) { \ - throw simgrid::AssertionError(__VA_ARGS__); \ + if (not(cond)) { \ + throw simgrid::AssertionError(XBT_THROW_POINT, xbt::string_printf(__VA_ARGS__)); \ } \ } while (0) - -} // namespace xbt -} // namespace simgrid - #endif