From a3d1cb41b1fba5db4f87a22c92144833455e93f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 28 Feb 2011 16:26:20 +0000 Subject: [PATCH] change assertion for MSVC and Sun CC --- Number_types/include/CGAL/Interval_nt.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Number_types/include/CGAL/Interval_nt.h b/Number_types/include/CGAL/Interval_nt.h index cd9229d85ad..9a9765b3746 100644 --- a/Number_types/include/CGAL/Interval_nt.h +++ b/Number_types/include/CGAL/Interval_nt.h @@ -85,8 +85,13 @@ public: { // VC++ should use instead : (i<=s) || !is_valid(i) || !is_valid(s) // Or should I use is_valid() ? or is_valid_or_nan() ? + #if defined __SUNPRO_CC || defined(BOOST_MSVC) + CGAL_assertion_msg((i<=s) || !is_valid(i) || !is_valid(s), + " Variable used before being initialized (or CGAL bug)"); + #else CGAL_assertion_msg(!(i>s), " Variable used before being initialized (or CGAL bug)"); + #endif #ifndef CGAL_DISABLE_ROUNDING_MATH_CHECK CGAL_assertion_code((void) tester;) // Necessary to trigger a runtime test of rounding modes. #endif