diff --git a/Packages/Interval_arithmetic/include/CGAL/Lazy_exact_nt.h b/Packages/Interval_arithmetic/include/CGAL/Lazy_exact_nt.h index f4030d18cbf..ba1e81efeff 100644 --- a/Packages/Interval_arithmetic/include/CGAL/Lazy_exact_nt.h +++ b/Packages/Interval_arithmetic/include/CGAL/Lazy_exact_nt.h @@ -320,6 +320,10 @@ to_interval(const Lazy_exact_nt & a) return a.approx(); } +// VC++ doesn't support partial overloading of function templates. +// The other way would be to not define the global templates so that +// they don't interfere with template NTs. +#ifndef _MSC_VER // Note: GCC 2.95 completely and silently ignores the catch block // of _template_ function-try-blocks. Later versions fix the bug. namespace NTS { @@ -370,12 +374,15 @@ square(const Lazy_exact_nt & a) } // namespace NTS +#endif // _MSC_VER + template inline Lazy_exact_nt sqrt(const Lazy_exact_nt & a) { return new Lazy_exact_Sqrt(a); } +#ifndef _MSC_VER template inline Lazy_exact_nt @@ -387,6 +394,7 @@ inline Lazy_exact_nt max(const Lazy_exact_nt & a, const Lazy_exact_nt & b) { return new Lazy_exact_Max(a, b); } +#endif // _MSC_VER template std::ostream &