Subject: CGAL users discussion list
List archive
- From: Philipp Moeller <>
- To:
- Subject: Re: [cgal-discuss] Use Point_set_2.h with LLVM clang
- Date: Thu, 26 Jul 2012 11:01:11 +0200
- Organization: GeometryFactory
Fisher
<>
writes:
> Hi,
>
> I am using some functions in Point_set_2.h for range searching. The
> compilation is fine with g++ 4.7 and 4.6 with c++0x turned on. But when I
> tried to compile my code using clang, I got this error:
>
> ... snip error messages ...
>
> The code snippet causing this problem is
>
> ypedef CGAL::Exact_predicates_inexact_constructions_kernel K;
> typedef CGAL::Point_set_2<K>::Vertex_handle VertexHandle;
> typedef K::Point_2 Point_2;
>
> std::vector<VertexHandle> handles;
> Point_2 a(rect.x, rect.y + rect.height);
> Point_2 b(rect.x, rect.y);
> Point_2 c(rect.x + rect.width, rect.y);
> Point_2 d(rect.x + rect.width, rect.y + rect.height);
> point_set_.range_search(a, b, c, d, std::back_inserter(handles));
> std::vector<cv::Point2d> points;
> points.reserve(handles.size());
> for (auto it = handles.begin(); it != handles.end(); ++it)
> {
> auto p = (*it)->point();
> points.push_back(cv::Point2d(p.x(), p.y()));
> }
>
> My platform is Mac OS X 10.7 and the compiler I was using is the one shipped
> with XCode Apple clang 3.1 (LLVM 3.1 svn). My CGAL is compiled with c++11
> support.
>
> I am not quite familiar with the internal of CGAL and thus it is hard for me
> to interpret the error messages. Can anyone tell me what's going wrong here
> and how to fix it?
CGAL 4.0.x has a few issues with clang (as you found out). Nearly all
packages should work with CGAL 4.1. The beta should be available in
about a week. I can't remember if the error you posted was the only
problem in Point_set_2. If so, making the failing conversion explicit
should fix it.
HTH,
Philipp
- [cgal-discuss] Use Point_set_2.h with LLVM clang, Fisher, 07/25/2012
- Re: [cgal-discuss] Use Point_set_2.h with LLVM clang, Philipp Moeller, 07/26/2012
- [cgal-discuss] Re: Use Point_set_2.h with LLVM clang, Fisher, 07/26/2012
- Re: [cgal-discuss] Use Point_set_2.h with LLVM clang, Philipp Moeller, 07/26/2012
Archive powered by MHonArc 2.6.18.