diff --git a/Filtered_kernel/include/CGAL/Filtered_predicate.h b/Filtered_kernel/include/CGAL/Filtered_predicate.h index 63199a63a32..da9e4b1c4fb 100644 --- a/Filtered_kernel/include/CGAL/Filtered_predicate.h +++ b/Filtered_kernel/include/CGAL/Filtered_predicate.h @@ -37,6 +37,10 @@ namespace CGAL { // not, or we let all this up to the compiler optimizer to figure out ? // - Some caching could be done at the Point_2 level. +// Protection is undocumented and currently always true, meaning that it +// assumes a default rounding mode of round-to-nearest. false would correspond +// to a default of round-towards-infinity, so interval arithmetic does not +// require protection but regular code may. template class Filtered_predicate diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Filtered_predicate2.h b/NewKernel_d/include/CGAL/NewKernel_d/Filtered_predicate2.h index 5a0d6f20255..2064af0b986 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Filtered_predicate2.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Filtered_predicate2.h @@ -39,7 +39,11 @@ namespace CGAL { // not, or we let all this up to the compiler optimizer to figure out ? // - Some caching could be done at the Point_2 level. -// FIXME: understand and document what the parameter 'Protection' means exactly +// Protection has a different meaning than in Filtered_predicate, it says +// whether we need to set the rounding mode: some predicates only do +// comparisons and don't need it. Probably this should be done inside this +// class, based on Uses_no_arithmetic, but I have some doubts about C2A, +// converting a long long to Interval_nt requires protection. template class Filtered_predicate2 @@ -88,7 +92,6 @@ public: catch (Uncertain_conversion_exception&) {} } CGAL_BRANCH_PROFILER_BRANCH(tmp); - Protect_FPU_rounding p(CGAL_FE_TONEAREST); return ep(c2e(std::forward(args))...); } };