From: Martin Quinson Date: Sun, 14 May 2017 09:31:52 +0000 (+0200) Subject: fix a typing issue around std::abs X-Git-Tag: v3.16~274^2~24 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/e07d1ce245237cd67b89c58ac67cd49edb83f408?hp=1fdee300704e9c3dfad1d38f95f66522f83deb1b fix a typing issue around std::abs It seems that C++11 systems want std::abs for doubles, and C++17 ones want std::fabs for that. So let's stick to the C version. --- diff --git a/src/surf/trace_mgr_test.cpp b/src/surf/trace_mgr_test.cpp index 6c6c164437..0ef287dc90 100644 --- a/src/surf/trace_mgr_test.cpp +++ b/src/surf/trace_mgr_test.cpp @@ -16,6 +16,8 @@ namespace utf = boost::unit_test; #include "xbt/log.h" #include "xbt/misc.h" +#include + XBT_LOG_NEW_DEFAULT_CATEGORY(unit, "Unit tests of the Trace Manager"); double thedate; @@ -31,7 +33,7 @@ public: static inline bool doubleEq(double d1, double d2) { - return std::abs(d1 - d2) < 0.0001; + return fabs(d1 - d2) < 0.0001; } class Evt { public: