Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] Compilation error with cpp11::result_of<Kernel::Intersect_3(A, B)>::type
Chronological Thread
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Compilation error with cpp11::result_of<Kernel::Intersect_3(A, B)>::type
- Date: Mon, 28 Jul 2014 14:06:59 +0200
- Organization: GeometryFactory
Try compiling the following example:
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_3.h>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Delaunay_triangulation_3<K> DT3;
typedef DT3::Triangle T3;
typedef DT3::Ray R3;
typedef CGAL::cpp11::result_of<K::Intersect_3(R3,T3)>:: type Inter;
int main()
{
T3 t3;
R3 r3;
Inter i = CGAL::intersection(t3,r3);
}
If it does then you probably have a typo or something similar in the real code.
Sebastien.
On 07/28/2014 01:55 PM, Cedric Doucet wrote:
Sorry, I forgot to give the definition of Delaunay:
typedef CGAL::Triangulation_vertex_base_with_info_3<int, K> Vb;
typedef CGAL::Triangulation_cell_base_with_info_3<CellInfo, K> Cb;
typedef CGAL::Triangulation_data_structure_3<Vb,Cb> Tds;
typedef CGAL::Delaunay_triangulation_3<K, Tds> Delaunay;
Cédric
----- Mail original -----
De: "cdoucet"
<>
À:
Envoyé: Lundi 28 Juillet 2014 13:51:00
Objet: [cgal-discuss] Compilation error with
cpp11::result_of<Kernel::Intersect_3(A, B)>::type
Hello,
I am trying to compute intersections following this section
<http://doc.cgal.org/latest/Kernel_23/group__intersection__linear__grp.html>
of the documentation.
My version of CGAL is 4.4.
My version of boost is 1.46.1
My implementation is based on the definitions above:
------------------------------------------------
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef Delaunay::Ray Ray;
typedef Delaunay::Triangle Triangle;
typedef CGAL::cpp11::result_of<K::Intersect_3(Ray, Triangle)>::type
RayTriangleIntersection;
------------------------------------------------
I have a compilation error with this line:
RayTriangleIntersection
intersection(currentRay,facetOppositeToVisiblePoint);
where
currentRay is a Ray,
facetOppositeToVisiblePoint is a Triangle obtained from triangle
<http://doc.cgal.org/latest/Triangulation_3/classCGAL_1_1Triangulation__3.html#a4672fcd04d571aee926741920d0aba30>
function
When I try to compile, I get the following error message:
erreur: no matching function for call to
‘boost::optional<boost::variant<CGAL::Point_3<CGAL::Epick>,
CGAL::Segment_3<CGAL::Epick>, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_> >::optional(Ray&, Triangle&)’
/home/cdoucet/local/mvs/demo/triangulation/delaunay.cpp:274:82: note:
candidates are:
/usr/include/boost/optional/optional.hpp:564:5: note:
boost::optional<T>::optional(const boost::optional<T>&) [with T =
boost::variant<CGAL::Point_3<CGAL::Epick>, CGAL::Segment_3<CGAL::Epick>,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_>,
boost::optional<T> =
boost::optional<boost::variant<CGAL::Point_3<CGAL::Epick>,
CGAL::Segment_3<CGAL::Epick>, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_> >]
/usr/include/boost/optional/optional.hpp:564:5: note: candidate expects 1
argument, 2 provided
/usr/include/boost/optional/optional.hpp:559:14: note: template<class Expr>
boost::optional::optional(const Expr&)
/usr/include/boost/optional/optional.hpp:539:14: note: template<class U>
boost::optional::optional(const boost::optional<U>&)
/usr/include/boost/optional/optional.hpp:530:5: note:
boost::optional<T>::optional(bool, boost::optional<T>::argument_type) [with
T = boost::variant<CGAL::Point_3<CGAL::Epick>,
CGAL::Segment_3<CGAL::Epick>, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_>, boost::optional<T>::argument_type = const
boost::variant<CGAL::Point_3<CGAL::Epick>, CGAL::Segment_3<CGAL::Epick>,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_>&]
/usr/include/boost/optional/optional.hpp:530:5: note: no known conversion
for argument 1 from ‘Ray {aka CGAL::Ray_3<CGAL::Epick>}’ to ‘bool’
/usr/include/boost/optional/optional.hpp:526:5: note:
boost::optional<T>::optional(boost::optional<T>::argument_type) [with T =
boost::variant<CGAL::Point_3<CGAL::Epick>, CGAL::Segment_3<CGAL::Epick>,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_>,
boost::optional<T>::argument_type = const
boost::variant<CGAL::Point_3<CGAL::Epick>, CGAL::Segment_3<CGAL::Epick>,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_>&]
/usr/include/boost/optional/optional.hpp:526:5: note: candidate expects 1
argument, 2 provided
/usr/include/boost/optional/optional.hpp:522:5: note:
boost::optional<T>::optional(boost::none_t) [with T =
boost::variant<CGAL::Point_3<CGAL::Epick>, CGAL::Segment_3<CGAL::Epick>,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_>, boost::none_t
= int boost::detail::none_helper::*]
/usr/include/boost/optional/optional.hpp:522:5: note: candidate expects 1
argument, 2 provided
/usr/include/boost/optional/optional.hpp:518:5: note:
boost::optional<T>::optional() [with T =
boost::variant<CGAL::Point_3<CGAL::Epick>, CGAL::Segment_3<CGAL::Epick>,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_>]
/usr/include/boost/optional/optional.hpp:518:5: note: candidate expects 0
arguments, 2 provided
Do you see where I make a mistake?
Best,
Cédric
Inria Paris-Rocquencourt
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Compilation-error-with-cpp11-result-of-Kernel-Intersect-3-A-B-type-tp4659631.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
- [cgal-discuss] Compilation error with cpp11::result_of<Kernel::Intersect_3(A, B)>::type, cdoucet, 07/28/2014
- Re: [cgal-discuss] Compilation error with cpp11::result_of<Kernel::Intersect_3(A, B)>::type, Cedric Doucet, 07/28/2014
- Re: [cgal-discuss] Compilation error with cpp11::result_of<Kernel::Intersect_3(A, B)>::type, Sebastien Loriot (GeometryFactory), 07/28/2014
- Re: [cgal-discuss] Compilation error with cpp11::result_of<Kernel::Intersect_3(A, B)>::type, Cedric Doucet, 07/28/2014
- Re: [cgal-discuss] Compilation error with cpp11::result_of<Kernel::Intersect_3(A, B)>::type, Sebastien Loriot (GeometryFactory), 07/28/2014
- Re: [cgal-discuss] Compilation error with cpp11::result_of<Kernel::Intersect_3(A, B)>::type, Cedric Doucet, 07/28/2014
Archive powered by MHonArc 2.6.18.