Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] difficulties with clang and c+11

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] difficulties with clang and c+11


Chronological Thread 
  • From: Philipp Moeller <>
  • To: Ruud Vlaming <>
  • Cc:
  • Subject: Re: [cgal-discuss] difficulties with clang and c+11
  • Date: Wed, 22 May 2013 10:37:59 +0200
  • Organization: GeometryFactory

Ruud Vlaming
<>
writes:

> Hello Guys,
>
> When trying to compile open-scad, (which makes use of cgal)
> for c++11 on mac i get an error. Hopefully you can help.
>
> versions:
> mac: 10.8.3
> boost: 1.53.0 (via macports)
> cgal 4.2 (via macports)
> clang: Apple LLVM version 4.2 (clang-425.0.27) (based on LLVM 3.2svn)
>
> compile options (generated by qmake => cmake)
> /usr/bin/clang++
> -c
> -pipe
> -fno-strict-aliasing
> -std=c++11
> -stdlib=libc++
> -frounding-math
> -O2
> -arch x86_64
> -Xarch_x86_64
> -mmacosx-version-min=10.8
> -Wall
> -W
>
> (see below for complete compile instruction and results)
>
> cgal related error:
>
> no viable conversion from 'Line_face_circulator'
> in lines 544, 577 and 593 of the file
> CGAL/Constrained_triangulation
>
> Any idea how i can resolve this? Thanks for any help.

If I remember correctly this is triggered by a bug in clang when it
comes to choosing an overload based on const-ness and a conversion
operator.

Can you apply the following patch to
Triangulation_line_face_circulator_2.h and check the result? I currently
don't have access to an Apple version of clang to test this myself.

diff --git
a/Triangulation_2/include/CGAL/Triangulation_line_face_circulator_2.h
b/Triangulation_2/include/CGAL/Triangulation_line_face_circulator_2.h
index cc43e76..fd7b989 100644
--- a/Triangulation_2/include/CGAL/Triangulation_line_face_circulator_2.h
+++ b/Triangulation_2/include/CGAL/Triangulation_line_face_circulator_2.h
@@ -93,7 +93,7 @@ public:
Face* operator->() {return &*pos;}
Face& operator*() { return *pos;}
Face_handle handle() {return pos;}
- operator const Face_handle() const {return pos;}
+ operator Face_handle() const {return pos;}
bool operator==(const Line_face_circulator& lfc) const;
bool operator!=(const Line_face_circulator& lfc) const;

[...snipped rest of the message...]




Archive powered by MHonArc 2.6.18.

Top of Page