Hello, I have some trouble using the CORE::BigFloat number type with the centroid function of CGAL, and I did not see any body with the same problems. Here is a minimal example that does not compile for me : #include <CGAL/CORE_BigFloat.h> I have the following error :
I can solve this by simply turning the unsigned nb_points into an int, but there is may be something I did not see, or the problem is solved in a more recent version of CGAL ? My environment is : Compiler : GNU 6.3.1, /usr/lib64/ccache/c++ OS : Fedora 25 CGAL : 4.9.1 installed with dnf Thanks ! Tom.

BigFloat does not have a constructor from unsigned int so it makes the
call in centroid ambiguous as you noted. Should be fixed by https://github.com/CGAL/cgal/pull/3166 Sebastien. On 06/08/2018 11:38 AM, Tom Dreyfus wrote: > Hello, > > I have some trouble using the CORE::BigFloat number type with the > centroid function of CGAL, and I did not see any body with the same > problems. > > Here is a minimal example that does not compile for me : > > /#include <CGAL/CORE_BigFloat.h>// > //#include <CGAL/Cartesian.h>// > //#include <CGAL/centroid.h>// > //typedef CGAL::Cartesian<CORE::BigFloat> K;// > //int main(int argc, char *argv[]){// > // std::vector<K::Point_3> points;// > // K::Point_3 c = CGAL::centroid(points.begin(), points.end());// > // return 0;}/ > > I have the following error : > > * > **/usr/include/CGAL/centroid.h:425:23: error: call of overloaded > ‘BigFloat(unsigned int&)’ is ambiguous** > ** return ORIGIN + v / (FT)nb_pts;** > ** ^~~~~~~~~~* > > I can solve this by simply turning the unsigned nb_points into an int, > but there is may be something I did not see, or the problem is solved in > a more recent version of CGAL ? > > My environment is : > > _Compiler_ : GNU 6.3.1, /usr/lib64/ccache/c++ > > _OS_ : Fedora 25 > > _CGAL_ : 4.9.1 installed with dnf > > Thanks ! > > Tom. > > > > >  You are currently subscribed to cgaldiscuss. To unsubscribe or access the archives, go to https://sympa.inria.fr/sympa/info/cgaldiscuss 
Free forum by Nabble  Edit this page 