Subject: CGAL users discussion list
List archive
- From: Marc Glisse <>
- To:
- Subject: Re: [cgal-discuss] "unite" operation in MinKowski_2
- Date: Mon, 16 May 2011 15:44:49 +0200 (CEST)
On Mon, 16 May 2011, Sebastien Loriot (GeometryFactory) wrote:
The problem you have comes from the fact that x() and y() don't return
references. Due to the type_equality_wrapper (the mechanism making Kernel::Point_2 and Point_2<kernel> being compatible), a reference to
a temporary is returned at some point.
You should write:
const MP_FT& x() const {return *pos;}
const MP_FT& y() const {return *(pos+1);}
Or provide your own Compute_x_2 functor, as having a reference return type in the wrapper depends on the Compute_x_2 functor deriving from Has_qrt (but indeed returning the type by reference is better).
--
Marc Glisse
- [cgal-discuss] "unite" operation in MinKowski_2, Yue Biek, 05/12/2011
- Re: [cgal-discuss] "unite" operation in MinKowski_2, Efraim Fogel, 05/12/2011
- Re: [cgal-discuss] "unite" operation in MinKowski_2, Yue Biek, 05/15/2011
- Re: [cgal-discuss] "unite" operation in MinKowski_2, Sebastien Loriot (GeometryFactory), 05/16/2011
- Re: [cgal-discuss] "unite" operation in MinKowski_2, Yue Biek, 05/16/2011
- Re: [cgal-discuss] "unite" operation in MinKowski_2, Bernd Gaertner, 05/16/2011
- Re: [cgal-discuss] "unite" operation in MinKowski_2, Yue Biek, 05/16/2011
- Re: [cgal-discuss] "unite" operation in MinKowski_2, Sebastien Loriot (GeometryFactory), 05/16/2011
- Re: [cgal-discuss] "unite" operation in MinKowski_2, Yue Biek, 05/16/2011
- Re: [cgal-discuss] "unite" operation in MinKowski_2, Marc Glisse, 05/16/2011
- Re: [cgal-discuss] "unite" operation in MinKowski_2, Yue Biek, 05/16/2011
- Re: [cgal-discuss] "unite" operation in MinKowski_2, Bernd Gaertner, 05/16/2011
- Re: [cgal-discuss] "unite" operation in MinKowski_2, Yue Biek, 05/16/2011
- Re: [cgal-discuss] "unite" operation in MinKowski_2, Sebastien Loriot (GeometryFactory), 05/16/2011
- Re: [cgal-discuss] "unite" operation in MinKowski_2, Yue Biek, 05/15/2011
- Re: [cgal-discuss] "unite" operation in MinKowski_2, Efraim Fogel, 05/12/2011
Archive powered by MHonArc 2.6.16.