Remove unused functors

last used: 369498d (2011-07-06)
This commit is contained in:
Mael Rouxel-Labbé 2024-12-12 17:20:49 +01:00
parent a052572103
commit ea9c2a3a6c
1 changed files with 0 additions and 111 deletions

View File

@ -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<Something>,
// and that the result type is void
template <typename AC, typename EC, typename E2A>
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 <typename L1, typename L2, typename R1>
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<Protection> P;
try {
// we suppose that R1 is a Lazy<Something>
r1 = R1(new Lazy_rep_2_1<AC, EC, E2A, L1, L2, R1>(ac, ec, l1, l2));
return;
} catch (Uncertain_conversion_exception&) {}
}
CGAL_BRANCH_PROFILER_BRANCH(tmp);
Protect_FPU_rounding<!Protection> 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<typename R1::AT,typename R1::ET,E2A>(et));
}
};
template <typename T>
struct First
{
typedef typename T::first_type result_type;
const typename T::first_type&
operator()(const T& p) const
{
return p.first;
}
};
template <typename T>
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<Something>,
// and that the result type is void
//template <typename LK, typename AK, typename EK, typename AC, typename EC, typename EFT, typename E2A>
template <typename LK, typename AC, typename EC>
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 <typename L1, typename L2, typename R1, typename R2>
void
operator()(const L1& l1, const L2& l2, R1& r1, R2& r2) const
{
typedef Lazy<typename R1::AT, typename R1::ET, E2A> Handle_1;
typedef Lazy<typename R2::AT, typename R2::ET, E2A> Handle_2;
CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
{
Protect_FPU_rounding<Protection> P;
try {
typedef Lazy<std::pair<typename R1::AT, typename R2::AT>, std::pair<typename R1::ET, typename R2::ET>, E2A> Lazy_pair;
Lazy_pair lv(new Lazy_rep_2_2<AC, EC, E2A, L1, L2, R1, R2>(ac, ec, l1, l2));
// lv->approx() is a std::pair<R1::AT, R2::AT>;
r1 = R1(Handle_1(new Lazy_rep_n<void, void, First<std::pair<typename R1::AT, typename R2::AT> >, First<std::pair<typename R1::ET, typename R2::ET> >, E2A, false, Lazy_pair>(First<std::pair<typename R1::AT, typename R2::AT> >(), First<std::pair<typename R1::ET, typename R2::ET> >(), lv)));
r2 = R2(Handle_2(new Lazy_rep_n<void, void, Second<std::pair<typename R1::AT, typename R2::AT> >, Second<std::pair<typename R1::ET, typename R2::ET> >, E2A, false, Lazy_pair>(Second<std::pair<typename R1::AT, typename R2::AT> >(), Second<std::pair<typename R1::ET, typename R2::ET> >(), lv)));
return;
} catch (Uncertain_conversion_exception&) {}
}
CGAL_BRANCH_PROFILER_BRANCH(tmp);
Protect_FPU_rounding<!Protection> 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<typename R1::AT,typename R1::ET,E2A>(et1)));
r2 = R2(Handle_2(new Lazy_rep_0<typename R2::AT,typename R2::ET,E2A>(et2)));
}
};
template <typename T>
struct Object_cast
{