From b17d618c7bd354356e2050ca870c8a4511dda44b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Mon, 7 Mar 2016 12:53:59 +0100 Subject: [PATCH] Use memcmp() from namespace std Don't rely on clients using #include before including cmp.hpp . --- opm/common/utility/numeric/cmp.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opm/common/utility/numeric/cmp.hpp b/opm/common/utility/numeric/cmp.hpp index 750712532..d061d837b 100644 --- a/opm/common/utility/numeric/cmp.hpp +++ b/opm/common/utility/numeric/cmp.hpp @@ -21,6 +21,7 @@ #define COMMON_UTIL_NUMERIC_CMP #include +#include #include #include #include @@ -109,7 +110,7 @@ namespace Opm { template bool array_equal(const T* p1, const T* p2, size_t num_elements, T abs_eps, T rel_eps) { - if (memcmp(p1 , p2 , num_elements * sizeof * p1) == 0) + if (std::memcmp(p1 , p2 , num_elements * sizeof * p1) == 0) return true; else { size_t index;