Subject: CGAL users discussion list
List archive
- From: Roger House <>
- To:
- Subject: [cgal-discuss] Polygon_2::bbox won't compile
- Date: Sun, 28 Sep 2008 10:35:49 -0700
I encountered a problem with Polygon_2::bbox which
I believe I have fixed, but I would like confirmation. Unfortunately,
I have not been able to devise a small program which demonstrates the
problem, and I am unable to send the larger program in which the
problem arose. However, the context was this: static bool some_func(const CGAL_Polygon &poly) { CGAL_Bbox bbox = poly.bbox(); ... } The call of poly.bbox resulted in the error message at the end of this email, in which line 234 of Polygon_2.h is mentioned. The return statement in the following function is line 234 of Polygon_2.h: Bbox_2 bbox() const { return bbox_2(d_container.begin(), d_container.end()); } After looking at some of the nearby code in Polygon_2.h, I made a wild guess and added a third parameter: return bbox_2(d_container.begin(), d_container.end(), traits); This not only compiled, but it seems to be working. Please let me if this fix is okay. Thank you, Roger House /usr/include/CGAL/Polygon_2.h: In member function ‘CGAL::Bbox_2 CGAL::Polygon_2<Traits_, Container_>::bbox() const [with Traits_P = CGAL::Cartesian<double>, Container_P = std::vector<CGAL::Point_2<CGAL::Cartesian<double> >, std::allocator<CGAL::Point_2<CGAL::Cartesian<double> > > >]’: connhole.cpp:320: instantiated from here /usr/include/CGAL/Polygon_2.h:234: error: no matching function for call to ‘bbox_2(__gnu_cxx::__normal_iterator<const CGAL::Point_2<CGAL::Cartesian<double> >*, std::vector<CGAL::Point_2<CGAL::Cartesian<double> >, std::allocator<CGAL::Point_2<CGAL::Cartesian<double> > > > >, __gnu_cxx::__normal_iterator<const CGAL::Point_2<CGAL::Cartesian<double> >*, std::vector<CGAL::Point_2<CGAL::Cartesian<double> >, std::allocator<CGAL::Point_2<CGAL::Cartesian<double> > > > >)’ |
- [cgal-discuss] Polygon_2::bbox won't compile, Roger House, 09/28/2008
- Re: [cgal-discuss] Polygon_2::bbox won't compile, Sylvain Pion, 09/30/2008
Archive powered by MHonArc 2.6.16.