avoid compilation loop when using a decltype based implementation of result_of

same fix as CK2
As expected the Spherical_kernel with  Lazy_kernel no longer
compiles. I'll fix it.
This commit is contained in:
Sébastien Loriot 2013-03-15 18:35:50 +01:00
parent a8e6c05e9b
commit 83d8a9578b
9 changed files with 330 additions and 234 deletions

View File

@ -26,9 +26,9 @@
#define CGAL_SPHERICAL_KERNEL_CIRCULAR_ARC_3_H
#include <CGAL/Circular_kernel_3/internal_functions_on_circular_arc_3.h>
#include <CGAL/Circular_kernel_3/Intersection_traits.h>
#include <boost/tuple/tuple.hpp>
namespace CGAL {
namespace internal{
template < class SK >
@ -164,7 +164,7 @@ namespace CGAL {
const Sphere_3 &s1, bool less_xyz_s1,
const Sphere_3 &s2, bool less_xyz_s2)
{
typedef typename cpp11::result_of<typename SK::Intersect_3(Circle_3, Sphere_3)>::type result_type;
typedef typename SK3_Intersection_traits<SK, Circle_3, Sphere_3>::type result_type;
std::vector<result_type> sols1, sols2;
// The spheres must not include the circle
CGAL_kernel_precondition(!SK().has_on_3_object()(s1,c));
@ -191,7 +191,7 @@ namespace CGAL {
const Plane_3 &p1, bool less_xyz_p1,
const Plane_3 &p2, bool less_xyz_p2)
{
typedef typename cpp11::result_of<typename SK::Intersect_3(Circle_3, Plane_3)>::type result_type;
typedef typename SK3_Intersection_traits<SK, Circle_3, Plane_3>::type result_type;
std::vector<result_type> sols1, sols2;
// The planes must not include the circle
CGAL_kernel_precondition(!SK().has_on_3_object()(p1,c));

View File

@ -26,7 +26,7 @@
#define CGAL_SPHERICAL_KERNEL_CIRCULAR_ARC_POINT_3_H
#include <iostream>
#include <CGAL/Circular_kernel_3/Intersection_traits.h>
//#include <CGAL/global_functions_on_roots_and_polynomials_2_2.h>
// fixme, devrait
// appeler fonction de global_functions_on_circular_arcs
@ -74,7 +74,7 @@ public:
const Sphere_3 &s2,
const Sphere_3 &s3,
const bool less_xyz = true) {
std::vector<typename cpp11::result_of<typename SK::Intersect_3(Sphere_3, Sphere_3, Sphere_3)>::type> sols;
std::vector<typename SK3_Intersection_traits<SK, Sphere_3, Sphere_3, Sphere_3>::type> sols;
SK().intersect_3_object()(s1, s2, s3, std::back_inserter(sols));
// s1,s2,s3 must intersect
CGAL_kernel_precondition(sols.size() != 0);
@ -97,7 +97,7 @@ public:
const Sphere_3 &s1,
const Sphere_3 &s2,
const bool less_xyz = true) {
std::vector<typename cpp11::result_of<typename SK::Intersect_3(Plane_3, Sphere_3, Sphere_3)>::type> sols;
std::vector<typename SK3_Intersection_traits<SK, Plane_3, Sphere_3, Sphere_3>::type> sols;
SK().intersect_3_object()(p, s1, s2, std::back_inserter(sols));
// s1,s2,s3 must intersect
CGAL_kernel_precondition(sols.size() != 0);
@ -120,7 +120,7 @@ public:
const Plane_3 &p2,
const Sphere_3 &s,
const bool less_xyz = true) {
std::vector<typename cpp11::result_of<typename SK::Intersect_3(Plane_3, Plane_3, Sphere_3)>::type> sols;
std::vector<typename SK3_Intersection_traits<SK, Plane_3, Plane_3, Sphere_3>::type> sols;
SK().intersect_3_object()(p1, p2, s, std::back_inserter(sols));
// s1,s2,s3 must intersect
CGAL_kernel_precondition(sols.size() != 0);
@ -142,7 +142,7 @@ public:
Circular_arc_point_3(const Line_3 &l,
const Sphere_3 &s,
const bool less_xyz = true) {
std::vector<typename cpp11::result_of<typename SK::Intersect_3(Line_3, Sphere_3)>::type> sols;
std::vector<typename SK3_Intersection_traits<SK, Line_3, Sphere_3>::type> sols;
SK().intersect_3_object()(l, s, std::back_inserter(sols));
// s1,s2,s3 must intersect
CGAL_kernel_precondition(sols.size() != 0);
@ -164,7 +164,7 @@ public:
Circular_arc_point_3(const Circle_3 &c,
const Plane_3 &p,
const bool less_xyz = true) {
std::vector<typename cpp11::result_of<typename SK::Intersect_3(Circle_3, Plane_3)>::type> sols;
std::vector<typename SK3_Intersection_traits<SK, Circle_3, Plane_3>::type> sols;
SK().intersect_3_object()(c, p, std::back_inserter(sols));
// s1,s2,s3 must intersect
CGAL_kernel_precondition(sols.size() != 0);
@ -186,7 +186,7 @@ public:
Circular_arc_point_3(const Circle_3 &c,
const Sphere_3 &s,
const bool less_xyz = true) {
std::vector<typename cpp11::result_of<typename SK::Intersect_3(Circle_3, Sphere_3)>::type> sols;
std::vector<typename SK3_Intersection_traits<SK, Circle_3, Sphere_3>::type> sols;
SK().intersect_3_object()(c, s, std::back_inserter(sols));
// s1,s2,s3 must intersect
CGAL_kernel_precondition(sols.size() != 0);

View File

@ -0,0 +1,214 @@
// Copyright (c) 2013 GeometryFactory (France). All rights reserved.
// All rights reserved.
//
// Licensees holding a valid commercial license may use this file in
// accordance with the commercial license agreement provided with the software.
//
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; version 2.1 of the License.
// See the file LICENSE.LGPL distributed with CGAL.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//
// $URL$
// $Id$
//
//
// Author(s) : Philipp Möller and Sebastien Loriot
#ifndef CGAL_CIRCULAR_KERNEL_3_INTERSECTION_TRAITS_H
#define CGAL_CIRCULAR_KERNEL_3_INTERSECTION_TRAITS_H
//this include is needed to know the value of CGAL_INTERSECTION_VERSION
#include <CGAL/Intersection_traits.h>
#if !(CGAL_INTERSECTION_VERSION < 2)
#include <boost/variant.hpp>
#include <utility>
namespace CGAL {
template <typename SK, typename T1, typename T2, typename T3=void*>
struct SK3_Intersection_traits
{};
template <typename SK>
struct SK3_Intersection_traits<SK, typename SK::Sphere_3, typename SK::Line_3>
{
typedef boost::variant<
std::pair< typename SK::Circular_arc_point_3, unsigned int >
> type;
};
template <typename SK>
struct SK3_Intersection_traits<SK, typename SK::Line_3, typename SK::Sphere_3>
: SK3_Intersection_traits<SK, typename SK::Sphere_3, typename SK::Line_3> {};
template <typename SK>
struct SK3_Intersection_traits<SK, typename SK::Circle_3, typename SK::Plane_3>
{
typedef boost::variant<
std::pair< typename SK::Circular_arc_point_3, unsigned int >,
typename SK::Circle_3
> type; };
template <typename SK>
struct SK3_Intersection_traits<SK, typename SK::Plane_3, typename SK::Circle_3>
: SK3_Intersection_traits<SK, typename SK::Circle_3, typename SK::Plane_3> {};
template <typename SK>
struct SK3_Intersection_traits<SK, typename SK::Circle_3, typename SK::Sphere_3>
{
typedef boost::variant<
std::pair< typename SK::Circular_arc_point_3, unsigned int >,
typename SK::Circle_3
> type;
};
template <typename SK>
struct SK3_Intersection_traits<SK, typename SK::Sphere_3, typename SK::Circle_3>
: SK3_Intersection_traits<SK, typename SK::Circle_3, typename SK::Sphere_3> {};
template <typename SK>
struct SK3_Intersection_traits<SK, typename SK::Circle_3, typename SK::Circle_3>
{
typedef boost::variant<
std::pair <typename SK::Circular_arc_point_3, unsigned int >,
typename SK::Circle_3
> type;
};
template <typename SK>
struct SK3_Intersection_traits<SK, typename SK::Circle_3, typename SK::Line_3>
{
typedef boost::variant<
std::pair <typename SK::Circular_arc_point_3, unsigned int >
> type;
};
template <typename SK>
struct SK3_Intersection_traits<SK, typename SK::Line_3, typename SK::Circle_3>
: SK3_Intersection_traits<SK, typename SK::Circle_3, typename SK::Line_3> {};
template <typename SK>
struct SK3_Intersection_traits<SK, typename SK::Circular_arc_3, typename SK::Circular_arc_3>
{
typedef boost::variant<
typename SK::Circle_3,
std::pair <typename SK::Circular_arc_point_3, unsigned int >,
typename SK::Circular_arc_3
> type;
};
template <typename SK>
struct SK3_Intersection_traits<SK, typename SK::Circular_arc_3, typename SK::Plane_3>
{
typedef boost::variant<
std::pair <typename SK::Circular_arc_point_3, unsigned int >,
typename SK::Circular_arc_3
> type;
};
template <typename SK>
struct SK3_Intersection_traits<SK, typename SK::Plane_3, typename SK::Circular_arc_3>
: SK3_Intersection_traits<SK, typename SK::Circular_arc_3, typename SK::Plane_3> {};
template <typename SK>
struct SK3_Intersection_traits<SK, typename SK::Line_arc_3, typename SK::Line_arc_3>
{
typedef boost::variant<
std::pair <typename SK::Circular_arc_point_3, unsigned int >,
typename SK::Line_arc_3
> type;
};
//struct to factorize the following specializations
template <typename SK>
struct SK3_intersect_ternary
{
typedef boost::variant<
typename SK::Circle_3,
typename SK::Plane_3,
typename SK::Sphere_3,
std::pair< typename SK::Circular_arc_point_3, unsigned >
> type;
};
template <typename SK>
struct SK3_Intersection_traits<SK, typename SK::Sphere_3, typename SK::Sphere_3, typename SK::Sphere_3>
: SK3_intersect_ternary<SK> {};
template <typename SK>
struct SK3_Intersection_traits<SK, typename SK::Sphere_3, typename SK::Sphere_3, typename SK::Plane_3>
: SK3_intersect_ternary<SK> {};
template <typename SK>
struct SK3_Intersection_traits<SK, typename SK::Plane_3, typename SK::Sphere_3, typename SK::Sphere_3>
: SK3_intersect_ternary<SK> {};
template <typename SK>
struct SK3_Intersection_traits<SK, typename SK::Plane_3, typename SK::Plane_3, typename SK::Sphere_3>
: SK3_intersect_ternary<SK> {};
template <typename SK>
struct SK3_Intersection_traits<SK, typename SK::Sphere_3, typename SK::Plane_3, typename SK::Plane_3>
: SK3_intersect_ternary<SK> {};
} //end of namespace CGAL
#else
#include <CGAL/Object.h>
template <typename CK, typename T1, typename T2, typename T3=void*>
struct SK3_Intersection_traits
{ typedef CGAL::Object type; };
#endif
namespace CGAL{
namespace internal{
// this function is used to call either make_object or a
// CK2_Intersection_traits::result_type constructor to create return
// values. The Object version takes some dummy template arguments
// that are needed for the return of the Intersection_traits. In
// theory a one parameter variant could be returned, but this
// _could_ come with conversion overhead and so we rather go for
// the real type.
// Overloads for empty returns are also provided.
#if CGAL_INTERSECTION_VERSION < 2
#if defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE)
template<typename, typename T>
inline
CGAL::Object sk3_intersection_return(const T& t) { return CGAL::make_object(t); }
#else
template<typename, typename T>
inline
CGAL::Object sk3_intersection_return(T&& t) { return CGAL::make_object(std::forward<T>(t)); }
#endif // CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE
template<typename>
inline
CGAL::Object sk3_intersection_return() { return CGAL::Object(); }
#else
#if defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE)
template<typename RT, typename T>
inline RT
sk3_intersection_return(const T& t) { return RT(t); }
#else
template<typename RT, typename T>
inline RT
sk3_intersection_return(T&& t) { return RT(std::forward<T>(t)); }
#endif // CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE
template<typename RT>
inline RT
sk3_intersection_return() { return RT(); }
#endif // CGAL_INTERSECTION_VERSION < 2
} } //end of namespace CGAL::internal
#endif // CGAL_CIRCULAR_KERNEL_2_INTERSECTION_TRAITS_H

View File

@ -26,6 +26,7 @@
#define CGAL_SPHERICAL_KERNEL_LINE_ARC_3_H
#include <CGAL/Circular_kernel_3/internal_functions_on_sphere_3.h>
#include <CGAL/Circular_kernel_3/Intersection_traits.h>
#include <boost/tuple/tuple.hpp>
namespace CGAL {
@ -93,7 +94,7 @@ namespace CGAL {
const Sphere_3 &s,
bool less_xyz_first = true)
{
std::vector<typename cpp11::result_of<typename SK::Intersect_3(Line_3, Sphere_3)>::type> sols;
std::vector<typename SK3_Intersection_traits<SK, Line_3, Sphere_3>::type> sols;
SK().intersect_3_object()(l, s, std::back_inserter(sols));
// l must intersect s in 2 points
CGAL_kernel_precondition(sols.size() == 2);
@ -112,7 +113,7 @@ namespace CGAL {
const Sphere_3 &s1, bool less_xyz_s1,
const Sphere_3 &s2, bool less_xyz_s2)
{
std::vector<typename cpp11::result_of<typename SK::Intersect_3(Line_3, Sphere_3)>::type> sols1, sols2;
std::vector<typename SK3_Intersection_traits<SK, Line_3, Sphere_3>::type> sols1, sols2;
SK().intersect_3_object()(l, s1, std::back_inserter(sols1));
SK().intersect_3_object()(l, s2, std::back_inserter(sols2));
// l must intersect s1 and s2
@ -135,7 +136,7 @@ namespace CGAL {
CGAL_kernel_precondition(!SK().has_on_3_object()(p1,l));
CGAL_kernel_precondition(!SK().has_on_3_object()(p2,l));
// l must intersect p1 and p2
typedef typename cpp11::result_of<typename SK::Intersect_3(Line_3, Plane_3)>::type Intersection;
typedef typename SK3_Intersection_traits<SK, Line_3, Plane_3>::type Intersection;
Intersection i1 = SK().intersect_3_object()(l, p1);
Intersection i2 = SK().intersect_3_object()(l, p2);
const typename SK::Point_3* point1=boost::get<typename SK::Point_3>( & *i1 );

View File

@ -39,8 +39,7 @@
#include <CGAL/Circular_kernel_3/internal_function_has_on_spherical_kernel.h>
#include <CGAL/Circular_kernel_3/internal_function_compare_spherical_kernel.h>
#include <CGAL/Circular_kernel_3/internal_function_compare_to_right_spherical_kernel.h>
#include <boost/type_traits/decay.hpp>
#include <CGAL/Circular_kernel_3/Intersection_traits.h>
namespace CGAL {
@ -1109,14 +1108,14 @@ template < class SK > \
#define CGAL_SPHERICAL_KERNEL_MACRO_DO_INTERSECTION_3_2(A,B) \
result_type \
operator()(const A & c1, const B & c2) const \
{ std::vector< typename cpp11::result_of<typename SK::Intersect_3(A, B)>::type > res; \
{ std::vector< typename SK3_Intersection_traits<SK, A, B>::type > res; \
typename SK::Intersect_3()(c1,c2,std::back_inserter(res)); \
return !res.empty(); }
#define CGAL_SPHERICAL_KERNEL_MACRO_DO_INTERSECTION_3_3(A,B,C) \
result_type \
operator()(const A & c1, const B & c2, const C & c3) const \
{ std::vector< typename cpp11::result_of<typename SK::Intersect_3(A, B, C)>::type > res; \
{ std::vector< typename SK3_Intersection_traits<SK, A, B, C>::type > res; \
typename SK::Intersect_3()(c1,c2,c3,std::back_inserter(res)); \
return !res.empty(); }
@ -1159,141 +1158,51 @@ template < class SK > \
template < class SK >
class Intersect_3
: public SK::Linear_kernel::Intersect_3
{
typedef typename SK::Sphere_3 Sphere_3;
typedef typename SK::Line_3 Line_3;
typedef typename SK::Line_arc_3 Line_arc_3;
typedef typename SK::Circular_arc_3 Circular_arc_3;
typedef typename SK::Plane_3 Plane_3;
typedef typename SK::Point_3 Point_3;
typedef typename SK::Circle_3 Circle_3;
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
public:
#if CGAL_INTERSECTION_VERSION < 2
// this is horribly wrong, nothing here returns Object
typedef typename SK::Linear_kernel::Intersect_3::result_type result_type;
#else
private:
// helper to minimize result implementation
template <typename A, typename B, typename C,
bool is_iterator = CGAL::is_iterator<typename boost::decay<C>::type>::value>
struct result_impl
{ typedef typename cpp11::result_of<typename SK::Linear_kernel::Intersect_3(A, B, C)>::type
type; };
template <typename A, typename B, typename C>
struct result_impl<A, B, C, true>
{ typedef C type; };
public:
template <typename>
struct result;
// the binary overload always goes to Linear::Intersect_3
template <typename F, typename A, typename B>
struct result<F(A, B)>
{ typedef typename cpp11::result_of<typename SK::Linear_kernel::Intersect_3(A, B)>::type type; };
{ typedef typename Intersection_traits<SK, A, B>::result_type type; };
// we match the ternary case if the last argument is an iterator,
// otherwise Linear::Intersect_3 wins
template <typename F, typename A, typename B, typename C>
struct result<F(A, B, C)> : result_impl<A, B, C> {};
// This one is only for the spherical kernel, O is an output iterator
template <typename F, typename A, typename B, typename OutputIterator>
struct result<F(A, B, OutputIterator)>
{ typedef OutputIterator type;};
// there is no quaternary form of Linear::Intersect_3
// there is no quaternary form in the linear Kernel
template <typename F, typename A, typename B, typename C, typename OutputIterator>
struct result<F(A, B, C, OutputIterator)>
struct result<F(A, B, C, OutputIterator)>
{ typedef OutputIterator type; };
// The problem: the results specified here are not the true
// result. The true result is OutputIterator. This will break in
// awful ways with a decltype based result_of implementation. The
// fix is to add dummy function calls with the correct return
// type.
// TODO: turn this into macros and also generate the dummy
// function calls.
template <typename F>
struct result<F(Sphere_3, Line_3)>
{ typedef boost::variant< std::pair< Circular_arc_point_3, unsigned int > > type; };
template <typename F>
struct result<F(Line_3, Sphere_3)> : result<F(Sphere_3, Line_3)> {};
template <typename F>
struct result<F(Circle_3, Plane_3)>
{ typedef boost::variant< std::pair< Circular_arc_point_3, unsigned int >, Circle_3 > type; };
template <typename F>
struct result<F(Plane_3, Circle_3)> : result<F(Circle_3, Plane_3)> {};
template <typename F>
struct result<F(Circle_3, Sphere_3)>
{ typedef boost::variant< std::pair< Circular_arc_point_3, unsigned int >, Circle_3 > type;};
template <typename F>
struct result<F(Sphere_3, Circle_3)> : result<F(Circle_3, Sphere_3)> {};
template <typename F>
struct result<F(Circle_3, Circle_3)>
{ typedef boost::variant< std::pair <Circular_arc_point_3, unsigned int >, Circle_3 > type; };
template <typename F>
struct result<F(Circle_3, Line_3)>
{ typedef boost::variant< std::pair <Circular_arc_point_3, unsigned int > > type; };
template <typename F>
struct result<F(Line_3, Circle_3)> : result<F(Circle_3, Line_3)> {};
template <typename F>
struct result<F(Circular_arc_3, Circular_arc_3)>
{ typedef boost::variant< Circle_3, std::pair <Circular_arc_point_3, unsigned int >,
Circular_arc_3 > type;};
template <typename F>
struct result<F(Circular_arc_3, Plane_3)>
{ typedef boost::variant< std::pair <Circular_arc_point_3, unsigned int >,
Circular_arc_3 > type; };
template <typename F>
struct result<F(Plane_3, Circular_arc_3)> : result<F(Circular_arc_3, Plane_3)> {};
template <typename F>
struct result<F(Line_arc_3, Line_arc_3)>
{ typedef boost::variant< std::pair <Circular_arc_point_3, unsigned int >,
Line_arc_3 > type; };
private:
struct intersect_ternary {
typedef boost::variant< Circle_3, Plane_3, Sphere_3,
std::pair< Circular_arc_point_3, unsigned >
> type;
//only ternary from the linear kernel
template<typename F>
struct result<F(Plane_3, Plane_3, Plane_3)> {
#if CGAL_INTERSECTION_VERSION < 2
typedef CGAL::Object type;
#else
typedef boost::optional<
boost::variant< Point_3,
Line_3,
Plane_3 > > type;
#endif
};
public:
// the ternary intersection
template <typename F>
struct result<F(Sphere_3, Sphere_3, Sphere_3)> : intersect_ternary {};
template <typename F>
struct result<F(Sphere_3, Sphere_3, Plane_3)> : intersect_ternary {};
template <typename F>
struct result<F(Plane_3, Sphere_3, Sphere_3)> : intersect_ternary {};
template <typename F>
struct result<F(Plane_3, Plane_3, Sphere_3)> : intersect_ternary {};
template <typename F>
struct result<F(Sphere_3, Plane_3, Plane_3)> : intersect_ternary {};
#endif
// forward the intersection functions from the linear kernel
template <typename A, typename B>
typename cpp11::result_of<typename SK::Intersect_3(A, B)>::type
operator()(const A& a, const B& b)
{ return typename SK::Linear_kernel().intersect_3_object()(a, b); }
template <typename A, typename B, typename C>
typename cpp11::result_of<typename SK::Intersect_3(A, B, C)>::type
operator()(const A& a, const B& b, const C& c,
typename boost::enable_if_c<!(CGAL::is_iterator<typename boost::decay<C>::type>::value)>::type* = 0)
{ return typename SK::Linear_kernel().intersect_3_object()(a, b, c); }
using SK::Linear_kernel::Intersect_3::operator();
template < class OutputIterator >
OutputIterator

View File

@ -28,6 +28,7 @@
#include <CGAL/Circle_type.h>
#include <CGAL/Circular_kernel_3/internal_functions_on_plane_3.h>
#include <CGAL/Circular_kernel_3/internal_functions_on_circular_arc_point_3.h>
#include <CGAL/Circular_kernel_3/Intersection_traits.h>
#include <CGAL/Root_of_traits.h>
namespace CGAL {
@ -120,8 +121,7 @@ namespace CGAL {
typename SK::FT z_coord=extremal_points_z_coordinate<SK>(circle,sphere);
typename SK::Plane_3 plane(0,0,1,-z_coord);
std::vector<typename cpp11::result_of<
typename SK::Intersect_3(typename SK::Circle_3, typename SK::Plane_3)>::type > inters;
std::vector<typename SK3_Intersection_traits<SK, typename SK::Circle_3, typename SK::Plane_3>::type > inters;
intersect_3<SK>(circle,plane,std::back_inserter(inters));
CGAL_kernel_precondition(inters.size()==2);

View File

@ -89,7 +89,7 @@ namespace CGAL {
{
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
typedef std::vector<
typename cpp11::result_of<typename SK::Intersect_3(typename SK::Line_3, typename SK::Circle_3 )>::type
typename SK3_Intersection_traits<SK, typename SK::Line_3, typename SK::Circle_3>::type
> solutions_container;
typedef std::pair<Circular_arc_point_3, unsigned> Solution;
@ -120,13 +120,10 @@ namespace CGAL {
OutputIterator res)
{
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
typedef typename cpp11::result_of<
typename SK::Intersect_3(typename SK::Circle_3, typename SK::Circular_arc_3)
>::type result_type;
typedef typename SK3_Intersection_traits<SK, typename SK::Circle_3, typename SK::Circular_arc_3>::type result_type;
typedef std::vector<typename cpp11::result_of<
typename SK::Intersect_3(typename SK::Circle_3, typename SK::Circle_3)
>::type > solutions_container;
typedef std::vector<typename SK3_Intersection_traits<SK, typename SK::Circle_3, typename SK::Circle_3
>::type > solutions_container;
typedef std::pair<Circular_arc_point_3, unsigned> Solution;
if(non_oriented_equal<SK>(c, ca.supporting_circle())) {
@ -159,13 +156,11 @@ namespace CGAL {
const typename SK::Circular_arc_3 & c,
OutputIterator res)
{
typedef typename cpp11::result_of<
typename SK::Intersect_3(typename SK::Sphere_3, typename SK::Circular_arc_3)
>::type result_type;
typedef typename SK3_Intersection_traits<SK, typename SK::Sphere_3, typename SK::Circular_arc_3
>::type result_type;
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
typedef std::vector<typename cpp11::result_of<
typename SK::Intersect_3(typename SK::Circle_3, typename SK::Sphere_3)>::type
typedef std::vector<typename SK3_Intersection_traits<SK, typename SK::Circle_3, typename SK::Sphere_3>::type
> solutions_container;
typedef std::pair<Circular_arc_point_3, unsigned> Solution;
@ -199,18 +194,17 @@ namespace CGAL {
const typename SK::Circular_arc_3 & ca,
OutputIterator res)
{
typedef typename cpp11::result_of<
typename SK::Intersect_3(typename SK::Plane_3, typename SK::Circular_arc_3)
typedef typename SK3_Intersection_traits<SK, typename SK::Plane_3, typename SK::Circular_arc_3
>::type result_type;
typedef typename SK::Point_3 Point_3;
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
typedef std::vector<
typename cpp11::result_of<typename SK::Intersect_3(typename SK::Circle_3, typename SK::Plane_3)>::type
typename SK3_Intersection_traits<SK, typename SK::Circle_3, typename SK::Plane_3>::type
> solutions_container;
typedef std::pair<Circular_arc_point_3, unsigned> Solution;
if(SK().has_on_3_object()(p,ca.supporting_circle())) {
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, typename SK::Plane_3, typename SK::Circular_arc_3>(ca);
*res++ = CGAL::internal::sk3_intersection_return<result_type>(ca);
}
solutions_container solutions;
@ -220,14 +214,14 @@ namespace CGAL {
if(solutions.size() == 1) {
const Solution& sol=*CGAL::internal::intersect_get<Solution>(solutions[0]);
if(SK().has_on_3_object()(ca,sol.first,true))
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, typename SK::Plane_3, typename SK::Circular_arc_3>(sol);
*res++ = CGAL::internal::sk3_intersection_return<result_type>(sol);
} else {
const Solution& sol1=*CGAL::internal::intersect_get<Solution>(solutions[0]);
const Solution& sol2=*CGAL::internal::intersect_get<Solution>(solutions[1]);
if(SK().has_on_3_object()(ca,sol1.first,true))
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, typename SK::Plane_3, typename SK::Circular_arc_3>(sol1);
*res++ = CGAL::internal::sk3_intersection_return<result_type>(sol1);
if(SK().has_on_3_object()(ca,sol2.first,true))
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, typename SK::Plane_3, typename SK::Circular_arc_3>(sol2);
*res++ = CGAL::internal::sk3_intersection_return<result_type>(sol2);
}
return res;
}
@ -240,7 +234,7 @@ namespace CGAL {
{
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
typedef std::vector<
typename cpp11::result_of<typename SK::Intersect_3(typename SK::Line_3, typename SK::Line_3)>::type>
typename SK3_Intersection_traits<SK, typename SK::Line_3, typename SK::Line_3>::type>
solutions_container;
typedef std::pair<Circular_arc_point_3, unsigned> Solution;
@ -273,26 +267,22 @@ namespace CGAL {
const typename SK::Circular_arc_3 & a2,
OutputIterator res)
{
typedef typename cpp11::result_of<
typename SK::Intersect_3(typename SK::Circular_arc_3, typename SK::Circular_arc_3)
>::type result_type;
typedef typename SK3_Intersection_traits<SK, typename SK::Circular_arc_3, typename SK::Circular_arc_3
>::type result_type;
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
typedef typename SK::Circular_arc_3 Circular_arc_3;
typedef std::vector< typename cpp11::result_of<
typename SK::Intersect_3(typename SK::Circle_3, typename SK::Circle_3 )
>::type> solutions_container;
typedef std::vector< typename SK3_Intersection_traits<SK, typename SK::Circle_3, typename SK::Circle_3>
::type> solutions_container;
typedef std::pair<Circular_arc_point_3, unsigned> Solution;
if(non_oriented_equal<SK>(a1.supporting_circle(), a2.supporting_circle())) {
if(a1.rep().is_full()) {
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, typename SK::Circular_arc_3,
typename SK::Circular_arc_3>(a2);
*res++ = CGAL::internal::sk3_intersection_return<result_type>(a2);
//return res;
}
else if(a2.rep().is_full()) {
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, typename SK::Circular_arc_3,
typename SK::Circular_arc_3>(a1);
*res++ = CGAL::internal::sk3_intersection_return<result_type>(a1);
//return res;
} else {
bool t2_in_a1 = SK().has_on_3_object()(a1,a2.target(),true);
@ -305,73 +295,58 @@ namespace CGAL {
SK().compare_xyz_3_object()(a1.source(), a2.source());
if(comp < 0) {
if(a1.source() == a2.target()) {
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, typename SK::Circular_arc_3,
typename SK::Circular_arc_3>(std::make_pair(a1.source(),1u));
*res++ = CGAL::internal::sk3_intersection_return<result_type>(std::make_pair(a1.source(),1u));
} else {
const Circular_arc_3 & arc =
Circular_arc_3(a1.supporting_circle(),a1.source(),a2.target());
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, typename SK::Circular_arc_3,
typename SK::Circular_arc_3>(arc);
*res++ = CGAL::internal::sk3_intersection_return<result_type>(arc);
}
if(a2.source() == a1.target()) {
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, typename SK::Circular_arc_3,
typename SK::Circular_arc_3>(std::make_pair(a2.source(),1u));
*res++ = CGAL::internal::sk3_intersection_return<result_type>(std::make_pair(a2.source(),1u));
} else {
const Circular_arc_3 & arc =
Circular_arc_3(a1.supporting_circle(),a2.source(),a1.target());
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, typename SK::Circular_arc_3,
typename SK::Circular_arc_3>(arc);
*res++ = CGAL::internal::sk3_intersection_return<result_type>(arc);
}
} else if(comp > 0) {
if(a2.source() == a1.target()) {
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, typename SK::Circular_arc_3,
typename SK::Circular_arc_3>(std::make_pair(a2.source(),1u));
*res++ = CGAL::internal::sk3_intersection_return<result_type>(std::make_pair(a2.source(),1u));
} else {
const Circular_arc_3 & arc =
Circular_arc_3(a1.supporting_circle(),a2.source(),a1.target());
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, typename SK::Circular_arc_3,
typename SK::Circular_arc_3>(arc);
*res++ = CGAL::internal::sk3_intersection_return<result_type>(arc);
}
if(a1.source() == a2.target()) {
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, typename SK::Circular_arc_3,
typename SK::Circular_arc_3>(std::make_pair(a1.source(),1u));
*res++ = CGAL::internal::sk3_intersection_return<result_type>(std::make_pair(a1.source(),1u));
} else {
const Circular_arc_3 & arc =
Circular_arc_3(a1.supporting_circle(),a1.source(),a2.target());
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, typename SK::Circular_arc_3,
typename SK::Circular_arc_3>(arc);
*res++ = CGAL::internal::sk3_intersection_return<result_type>(arc);
}
} else {
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, typename SK::Circular_arc_3,
typename SK::Circular_arc_3>(a1);
*res++ = CGAL::internal::sk3_intersection_return<result_type>(a1);
}
} else {
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, typename SK::Circular_arc_3,
typename SK::Circular_arc_3>(a2);
*res++ = CGAL::internal::sk3_intersection_return<result_type>(a2);
}
} else if(t2_in_a1) {
if(a1.source() == a2.target())
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, typename SK::Circular_arc_3,
typename SK::Circular_arc_3>(std::make_pair(a1.source(),1u));
*res++ = CGAL::internal::sk3_intersection_return<result_type>(std::make_pair(a1.source(),1u));
else {
const Circular_arc_3 & arc =
Circular_arc_3(a1.supporting_circle(),a1.source(),a2.target());
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, typename SK::Circular_arc_3,
typename SK::Circular_arc_3>(arc);
*res++ = CGAL::internal::sk3_intersection_return<result_type>(arc);
} //return res;
} else if(s2_in_a1) {
if(a2.source() == a1.target()) {
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, typename SK::Circular_arc_3,
typename SK::Circular_arc_3>(std::make_pair(a2.source(),1u));
*res++ = CGAL::internal::sk3_intersection_return<result_type>(std::make_pair(a2.source(),1u));
} else {
const Circular_arc_3 & arc =
Circular_arc_3(a1.supporting_circle(),a2.source(),a1.target());
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, typename SK::Circular_arc_3,
typename SK::Circular_arc_3>(arc);
*res++ = CGAL::internal::sk3_intersection_return<result_type>(arc);
}
} else if(SK().has_on_3_object()(a2,a1.source(),true)) {
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, typename SK::Circular_arc_3,
typename SK::Circular_arc_3>(a1);
*res++ = CGAL::internal::sk3_intersection_return<result_type>(a1);
}
}
} else {
@ -427,10 +402,8 @@ namespace CGAL {
typename SK::FT z_coord=extremal_points_z_coordinate<SK>(arc.supporting_circle(),sphere);
typename SK::Plane_3 plane(0,0,1,-z_coord);
std::vector<typename cpp11::result_of<
typename SK::Intersect_3(typename SK::Plane_3,
typename SK::Circular_arc_3)>::type>
inters;
std::vector<typename SK3_Intersection_traits<SK, typename SK::Plane_3, typename SK::Circular_arc_3>
::type> inters;
intersect_3<SK>(plane,arc,std::back_inserter(inters));
@ -482,8 +455,7 @@ namespace CGAL {
case NORMAL:{
typename SK::FT z_coord=extremal_points_z_coordinate<SK>(arc.supporting_circle(),sphere);
typename SK::Plane_3 plane(0,0,1,-z_coord);
std::vector<typename cpp11::result_of<
typename SK::Intersect_3(typename SK::Plane_3, typename SK::Circular_arc_3 )>::type
std::vector<typename SK3_Intersection_traits< SK, typename SK::Plane_3, typename SK::Circular_arc_3 >::type
> inters;
intersect_3<SK>(plane,arc,std::back_inserter(inters));
@ -609,9 +581,8 @@ namespace CGAL {
{
typename SK::Plane_3 plane(sphere.center(),sphere.center()+m,sphere.center()+typename SK::Vector_3(0,0,1));
std::vector<typename cpp11::result_of<
typename SK::Intersect_3(typename SK::Plane_3, typename SK::Circular_arc_3)
>::type> inters;
std::vector<typename SK3_Intersection_traits<SK, typename SK::Plane_3, typename SK::Circular_arc_3 >
::type> inters;
intersect_3<SK>(plane,arc,std::back_inserter(inters));
CGAL_kernel_precondition(!inters.empty());
if (inters.size()==1){

View File

@ -24,6 +24,8 @@
#ifndef CGAL_SPHERICAL_KERNEL_PREDICATES_ON_LINE_ARC_3_H
#define CGAL_SPHERICAL_KERNEL_PREDICATES_ON_LINE_ARC_3_H
#include <CGAL/Circular_kernel_3/Intersection_traits.h>
namespace CGAL {
namespace SphericalFunctors {
@ -86,9 +88,9 @@ namespace CGAL {
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
typedef typename SK::Line_3 Line_3;
typedef typename SK::Line_arc_3 Line_arc_3;
typedef typename cpp11::result_of<typename SK::Intersect_3(Line_arc_3, Line_arc_3)>::type result_type;
typedef typename SK3_Intersection_traits<SK, Line_arc_3, Line_arc_3>::type result_type;
typename cpp11::result_of<typename SK::Intersect_3(Line_3, Line_3)>::type o =
typename Intersection_traits<SK, Line_3, Line_3>::result_type o =
SK().intersect_3_object()(l1.supporting_line(),
l2.supporting_line());
@ -99,8 +101,8 @@ namespace CGAL {
Circular_arc_point_3 p = *inters_p;
if(!SK().has_on_3_object()(l1,p,true)) return res;
if(!SK().has_on_3_object()(l2,p,true)) return res;
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, Line_arc_3, Line_arc_3>(std::make_pair(p,1u));
} else if(const Line_3* inters_l = CGAL::internal::intersect_get<Line_3>(o)) {
*res++ = CGAL::internal::sk3_intersection_return<result_type>(std::make_pair(p,1u));
} else if( CGAL::internal::intersect_get<Line_3>(o) ) {
if(SK().compare_xyz_3_object()(l1.lower_xyz_extremity(),
l2.lower_xyz_extremity()) < 0) {
int comparison =
@ -109,15 +111,15 @@ namespace CGAL {
if(comparison < 0) {
if(SK().compare_xyz_3_object()(l1.higher_xyz_extremity(),
l2.higher_xyz_extremity()) <= 0) {
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, Line_arc_3, Line_arc_3>
*res++ = CGAL::internal::sk3_intersection_return<result_type>
(Line_arc_3(l1.supporting_line(),
l2.lower_xyz_extremity(),
l1.higher_xyz_extremity()));
} else {
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, Line_arc_3, Line_arc_3>(l2);
*res++ = CGAL::internal::sk3_intersection_return<result_type>(l2);
}
} else if (comparison == 0) {
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, Line_arc_3, Line_arc_3>(std::make_pair(l2.lower_xyz_extremity(),1u));
*res++ = CGAL::internal::sk3_intersection_return<result_type>(std::make_pair(l2.lower_xyz_extremity(),1u));
}
}
else {
@ -127,16 +129,16 @@ namespace CGAL {
if(comparison < 0){
if(SK().compare_xyz_3_object()(l1.higher_xyz_extremity(),
l2.higher_xyz_extremity()) <= 0) {
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, Line_arc_3, Line_arc_3>(l1);
*res++ = CGAL::internal::sk3_intersection_return<result_type>(l1);
} else {
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, Line_arc_3, Line_arc_3>
*res++ = CGAL::internal::sk3_intersection_return<result_type>
(Line_arc_3(l1.supporting_line(),
l1.lower_xyz_extremity(),
l2.higher_xyz_extremity() ));
}
}
else if (comparison == 0){
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, Line_arc_3, Line_arc_3>(std::make_pair(l1.lower_xyz_extremity(),1u));
*res++ = CGAL::internal::sk3_intersection_return<result_type>(std::make_pair(l1.lower_xyz_extremity(),1u));
}
}
}
@ -153,20 +155,20 @@ namespace CGAL {
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
typedef typename SK::Line_3 Line_3;
typedef typename SK::Line_arc_3 Line_arc_3;
typedef typename cpp11::result_of<typename SK::Intersect_3(Line_3, Line_arc_3)>::type result_type;
typedef typename SK3_Intersection_traits<SK, Line_3, Line_arc_3>::type result_type;
typename cpp11::result_of<typename SK::Intersect_3(Line_3, Line_3)>::type o =
typename Intersection_traits<SK, Line_3, Line_3>::result_type o =
SK().intersect_3_object()(l, la.supporting_line());
if(!o)
return res;
if(const Line_3* inters_l = CGAL::internal::intersect_get<Line_3>(o)) {
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, Line_3, Line_arc_3>(la);
*res++ = CGAL::internal::sk3_intersection_return<result_type>(la);
} else if(const Point_3* inters_p = CGAL::internal::intersect_get<Point_3>(o)) {
Circular_arc_point_3 p = *inters_p;
if(!SK().has_on_3_object()(la,p,true)) return res;
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, Line_3, Line_arc_3>(std::make_pair(p,1u));
*res++ = CGAL::internal::sk3_intersection_return<result_type>(std::make_pair(p,1u));
}
return res;
@ -180,11 +182,10 @@ namespace CGAL {
{
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
typedef std::vector<
typename cpp11::result_of<typename SK::Intersect_3(typename SK::Line_3, typename SK::Circle_3)
typename SK3_Intersection_traits<SK, typename SK::Line_3, typename SK::Circle_3
>::type> solutions_container;
typedef std::pair<Circular_arc_point_3, unsigned> Solution;
typedef typename cpp11::result_of<
typename SK::Intersect_3(typename SK::Circle_3, typename SK::Line_arc_3)>::type result_type;
typedef typename SK3_Intersection_traits<SK, typename SK::Circle_3, typename SK::Line_arc_3>::type result_type;
solutions_container solutions;
SK().intersect_3_object()(l.supporting_line(), c,
@ -213,9 +214,9 @@ namespace CGAL {
OutputIterator res)
{
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
typedef std::vector<typename cpp11::result_of<
typename SK::Intersect_3(typename SK::Line_3,
typename SK::Sphere_3)>::type > solutions_container;
typedef std::vector<
typename SK3_Intersection_traits<SK, typename SK::Line_3, typename SK::Sphere_3>::type
> solutions_container;
typedef std::pair<Circular_arc_point_3, unsigned> Solution;
solutions_container solutions;
SK().intersect_3_object()(l.supporting_line(), s,
@ -248,8 +249,8 @@ namespace CGAL {
*res++ = result_type(l);
}
const Point_3* sol;
typename cpp11::result_of<typename SK::Intersect_3(typename SK::Plane_3, typename SK::Line_3)>
::type o = SK().intersect_3_object()(p,l.supporting_line());
typename Intersection_traits<SK, typename SK::Plane_3, typename SK::Line_3>
::result_type o = SK().intersect_3_object()(p,l.supporting_line());
if(!o)
return res;

View File

@ -24,6 +24,8 @@
#ifndef CGAL_SPHERICAL_KERNEL_PREDICATES_ON_SPHERE_3_H
#define CGAL_SPHERICAL_KERNEL_PREDICATES_ON_SPHERE_3_H
#include <CGAL/Circular_kernel_3/Intersection_traits.h>
namespace CGAL {
namespace SphericalFunctors {
@ -244,7 +246,7 @@ namespace CGAL {
const typename SK::Line_3 & l,
OutputIterator res)
{
typedef typename cpp11::result_of<typename SK::Intersect_3(typename SK::Sphere_3, typename SK::Line_3)>
typedef typename SK3_Intersection_traits<SK, typename SK::Sphere_3, typename SK::Line_3>
::type result_type;
typedef typename SK::Algebraic_kernel Algebraic_kernel;
typedef typename SK::Polynomial_for_spheres_2_3 Equation_sphere;
@ -280,9 +282,7 @@ namespace CGAL {
typedef typename SK::Sphere_3 Sphere_3;
typedef typename SK::Plane_3 Plane_3;
typedef typename SK::Algebraic_kernel Algebraic_kernel;
typedef typename cpp11::result_of<
typename SK::Intersect_3(Sphere_3, Sphere_3, Sphere_3)
>::type result_type;
typedef typename SK3_Intersection_traits<SK, Sphere_3, Sphere_3, Sphere_3>::type result_type;
CGAL_kernel_precondition(!s1.is_degenerate());
CGAL_kernel_precondition(!s2.is_degenerate());
@ -296,7 +296,7 @@ namespace CGAL {
return res;
}
if(non_oriented_equal<SK>(s1,s2)) {
if(typename cpp11::result_of<typename SK::Intersect_3(Sphere_3, Sphere_3)>::type v =
if(typename Intersection_traits<SK, Sphere_3, Sphere_3>::result_type v =
SK().intersect_3_object()(s1, s3)) {
#if CGAL_INTERSECTION_VERSION < 2
if( const Point_3* p = object_cast<Point_3>(&v) )
@ -312,7 +312,7 @@ namespace CGAL {
return res;
}
if(non_oriented_equal<SK>(s1,s3) || non_oriented_equal<SK>(s2,s3)) {
if(typename cpp11::result_of<typename SK::Intersect_3(Sphere_3, Sphere_3)>::type v =
if(typename Intersection_traits<SK, Sphere_3, Sphere_3>::result_type v =
SK().intersect_3_object()(s1, s2)) {
#if CGAL_INTERSECTION_VERSION < 2
if( const Point_3* p = object_cast<Point_3>(&v) )
@ -329,7 +329,7 @@ namespace CGAL {
return res;
}
if(SK().collinear_3_object()(s1.center(),s2.center(),s3.center())) {
typename cpp11::result_of<typename SK::Intersect_3(Sphere_3, Sphere_3)>::type v =
typename Intersection_traits<SK, Sphere_3, Sphere_3>::result_type v =
SK().intersect_3_object()(s1, s2);
if(!v) return res;
if(const Point_3* p = CGAL::internal::intersect_get<Point_3>(v)) {
@ -385,7 +385,7 @@ namespace CGAL {
CGAL_kernel_precondition(!s1.is_degenerate());
CGAL_kernel_precondition(!s2.is_degenerate());
if(non_oriented_equal<SK>(s1,s2)) {
if(typename cpp11::result_of<typename SK::Intersect_3(Plane_3, Sphere_3)>::type v =
if(typename Intersection_traits<SK, Plane_3, Sphere_3>::result_type v =
SK().intersect_3_object()(p, s1)) {
#if CGAL_INTERSECTION_VERSION < 2
if( const typename SK::Point_3* p = CGAL::object_cast<typename SK::Point_3>(&v) )
@ -403,7 +403,7 @@ namespace CGAL {
}
Plane_3 radical_p = SK().construct_radical_plane_3_object()(s1,s2);
if(non_oriented_equal<SK>(p,radical_p)) {
if(typename cpp11::result_of<typename SK::Intersect_3(Plane_3, Sphere_3)>::type v =
if(typename Intersection_traits<SK, Plane_3, Sphere_3>::result_type v =
SK().intersect_3_object()(p, s1)) {
#if CGAL_INTERSECTION_VERSION < 2
if( const typename SK::Point_3* p = CGAL::object_cast<typename SK::Point_3>(&v) )
@ -449,7 +449,7 @@ namespace CGAL {
CGAL_kernel_precondition(!p2.is_degenerate());
CGAL_kernel_precondition(!s.is_degenerate());
if(non_oriented_equal<SK>(p1,p2)) {
if(typename cpp11::result_of<typename SK::Intersect_3(Plane_3, Sphere_3)>::type v =
if(typename Intersection_traits<SK, Plane_3, Sphere_3>::result_type v =
SK().intersect_3_object()(p1, s)) {
#if CGAL_INTERSECTION_VERSION < 2
if( const typename SK::Point_3* p = CGAL::object_cast<typename SK::Point_3>(&v) )
@ -505,11 +505,11 @@ namespace CGAL {
typedef typename SK::Algebraic_kernel Algebraic_kernel;
typedef typename SK::Circle_3 Circle_3;
typedef typename cpp11::result_of<typename SK::Intersect_3(Circle_3, Circle_3)>
typedef typename SK3_Intersection_traits<SK, Circle_3, Circle_3>
::type result_type;
if(non_oriented_equal<SK>(c1,c2)) {
*res++ = CGAL::internal::intersection_return<typename SK::Intersect_3, Circle_3, Circle_3>(c1);
*res++ = CGAL::internal::sk3_intersection_return<result_type>(c1);
return res;
}
Equation_circle e1 = get_equation<SK>(c1);
@ -533,7 +533,7 @@ namespace CGAL {
typedef typename SK::Polynomials_for_line_3 Equation_line;
typedef typename SK::Circle_3 Circle_3;
typedef typename cpp11::result_of<typename SK::Intersect_3(Circle_3, typename SK::Line_3)>
typedef typename SK3_Intersection_traits<SK, Circle_3, typename SK::Line_3>
::type result_type;
typedef typename SK::Algebraic_kernel Algebraic_kernel;