diff --git a/Filtered_kernel/include/CGAL/Lazy.h b/Filtered_kernel/include/CGAL/Lazy.h index 8b13a0d98f3..53207a20287 100644 --- a/Filtered_kernel/include/CGAL/Lazy.h +++ b/Filtered_kernel/include/CGAL/Lazy.h @@ -1524,117 +1524,6 @@ public: }; - -// This is the magic functor for functors that write their result in a reference argument -// In a first version we assume that the references are of type Lazy, -// and that the result type is void - -template -struct Lazy_functor_2_1 -{ - static const bool Protection = true; - typedef void result_type; - - CGAL_NO_UNIQUE_ADDRESS AC ac; - CGAL_NO_UNIQUE_ADDRESS EC ec; - -public: - - template - void - operator()(const L1& l1, const L2& l2, R1& r1) const - { - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - { - Protect_FPU_rounding P; - try { - // we suppose that R1 is a Lazy - r1 = R1(new Lazy_rep_2_1(ac, ec, l1, l2)); - return; - } catch (Uncertain_conversion_exception&) {} - } - CGAL_BRANCH_PROFILER_BRANCH(tmp); - Protect_FPU_rounding P2(CGAL_FE_TONEAREST); - CGAL_expensive_assertion(FPU_get_cw() == CGAL_FE_TONEAREST); - typename R1::ET et; - ec(CGAL::exact(l1), CGAL::exact(l2), et); - r1 = R1(new Lazy_rep_0(et)); - } -}; - - -template -struct First -{ - typedef typename T::first_type result_type; - - const typename T::first_type& - operator()(const T& p) const - { - return p.first; - } - }; - -template -struct Second -{ - typedef typename T::second_type result_type; - - const typename T::second_type& - operator()(const T& p) const - { - return p.second; - } -}; - -// This is the magic functor for functors that write their result in a reference argument -// In a first version we assume that the references are of type Lazy, -// and that the result type is void - -//template -template -struct Lazy_functor_2_2 -{ - static const bool Protection = true; - - typedef void result_type; - typedef typename LK::Approximate_kernel AK; - typedef typename LK::Exact_kernel EK; - typedef typename LK::E2A E2A; - - CGAL_NO_UNIQUE_ADDRESS AC ac; - CGAL_NO_UNIQUE_ADDRESS EC ec; - -public: - - template - void - operator()(const L1& l1, const L2& l2, R1& r1, R2& r2) const - { - typedef Lazy Handle_1; - typedef Lazy Handle_2; - CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); - { - Protect_FPU_rounding P; - try { - typedef Lazy, std::pair, E2A> Lazy_pair; - Lazy_pair lv(new Lazy_rep_2_2(ac, ec, l1, l2)); - // lv->approx() is a std::pair; - r1 = R1(Handle_1(new Lazy_rep_n >, First >, E2A, false, Lazy_pair>(First >(), First >(), lv))); - r2 = R2(Handle_2(new Lazy_rep_n >, Second >, E2A, false, Lazy_pair>(Second >(), Second >(), lv))); - return; - } catch (Uncertain_conversion_exception&) {} - } - CGAL_BRANCH_PROFILER_BRANCH(tmp); - Protect_FPU_rounding P2(CGAL_FE_TONEAREST); - CGAL_expensive_assertion(FPU_get_cw() == CGAL_FE_TONEAREST); - typename R1::ET et1, et2; - ec(CGAL::exact(l1), CGAL::exact(l2), et1, et2); - r1 = R1(Handle_1(new Lazy_rep_0(et1))); - r2 = R2(Handle_2(new Lazy_rep_0(et2))); - } -}; - template struct Object_cast {