From 09829b6da4fa4fd25925430f579ca085ebf99aa4 Mon Sep 17 00:00:00 2001 From: Sylvain Pion Date: Tue, 13 Apr 1999 15:49:17 +0000 Subject: [PATCH] - Tried workaround for MipsPro based on convert_from_to() and CGAL_CFG_NO_EXPLICIT_TEMPLATE_FUNCTION_ARGUMENT_SPECIFICATION. --- .../include/CGAL/Arithmetic_filter.h | 9 +++++++++ .../include/CGAL/Interval_arithmetic.h | 14 ++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/Packages/Interval_arithmetic/include/CGAL/Arithmetic_filter.h b/Packages/Interval_arithmetic/include/CGAL/Arithmetic_filter.h index 4f1eba0563a..240774391f3 100644 --- a/Packages/Interval_arithmetic/include/CGAL/Arithmetic_filter.h +++ b/Packages/Interval_arithmetic/include/CGAL/Arithmetic_filter.h @@ -86,9 +86,18 @@ struct Filtered_exact #ifdef CGAL_FILTER_USE_CACHE IA interval() const { return cache; } #else +#ifndef CGAL_CFG_NO_EXPLICIT_TEMPLATE_FUNCTION_ARGUMENT_SPECIFICATION IA interval() const { return convert_to(value); } +#else + IA interval() const { return convert_from_to(IA(), value); } +#endif // CGAL_CFG_NO_EXPLICIT_TEMPLATE_FUNCTION_ARGUMENT_SPECIFICATION #endif + +#ifndef CGAL_CFG_NO_EXPLICIT_TEMPLATE_FUNCTION_ARGUMENT_SPECIFICATION ET exact() const { return convert_to(value); } +#else + ET exact() const { return convert_from_to(ET(), value); } +#endif // CGAL_CFG_NO_EXPLICIT_TEMPLATE_FUNCTION_ARGUMENT_SPECIFICATION // This one should not be needed, at least for now. // CT stored_value() const { return value; } diff --git a/Packages/Interval_arithmetic/include/CGAL/Interval_arithmetic.h b/Packages/Interval_arithmetic/include/CGAL/Interval_arithmetic.h index d39f03fee6d..7f14cb07b6b 100644 --- a/Packages/Interval_arithmetic/include/CGAL/Interval_arithmetic.h +++ b/Packages/Interval_arithmetic/include/CGAL/Interval_arithmetic.h @@ -705,6 +705,19 @@ CGAL_END_NAMESPACE CGAL_BEGIN_NAMESPACE +template +inline +Interval_nt +convert_from_to (const Interval_nt&, const FT & z) +{ + FPU_CW_t backup = FPU_get_cw(); + FPU_set_cw(FPU_cw_up); + Interval_nt tmp(convert_from_to(Interval_nt_advanced(), z)); + FPU_set_cw(backup); + return tmp; +} + +#ifndef CGAL_CFG_NO_EXPLICIT_TEMPLATE_FUNCTION_ARGUMENT_SPECIFICATION template inline Interval_nt @@ -716,6 +729,7 @@ convert_to (const FT & z) FPU_set_cw(backup); return tmp; } +#endif // CGAL_CFG_NO_EXPLICIT_TEMPLATE_FUNCTION_ARGUMENT_SPECIFICATION CGAL_END_NAMESPACE