From 5030f1e929b76f4a610853f9634cb8574aa5aa9b Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 21 Mar 2011 10:27:07 +0000 Subject: [PATCH] Add macro CGAL_MSVC_USE_STD_FABS On Windows, with MSVC, std::fabs is an intrinsic function with /Oi (implied with /O1, /O2, and so on) *if* /fp:strict is not used. We should reevaluate the need to use /fp:strict (and maybe use /fp:precise, the default, combined with #pragma fenv_access). First step: bench! This macro will help. --- Number_types/include/CGAL/double.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Number_types/include/CGAL/double.h b/Number_types/include/CGAL/double.h index 7c731a786f7..ce9574f0cef 100644 --- a/Number_types/include/CGAL/double.h +++ b/Number_types/include/CGAL/double.h @@ -124,7 +124,7 @@ template <> class Real_embeddable_traits< double > public: // GCC is faster with std::fabs(). -#ifdef __GNUG__ +#if defined(__GNUG__) || defined(CGAL_MSVC_USE_STD_FABS) class Abs : public std::unary_function< Type, Type > { public: