Subject: CGAL users discussion list
List archive
- From: Yue Biek <>
- To:
- Subject: Re: [cgal-discuss] "unite" operation in MinKowski_2
- Date: Mon, 16 May 2011 21:51:19 +0800
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=hZfGCg8/P3ntyUguS1oCzyr8fFQQ0vzXPlqZj8jzR+sxj/9JqWshSTCLgS1IO6xpnP uysKXLMh4daCWkhazqFd/JHhbUtkTNbJ26QThLgy6KNFg8B0oKOr2Nx4UXaibyJljJfC ZnMAMEhJMTuo26+yVw0wTAdPLvlkqwp2nr9Dw=
Thank you , I will try this way.
2011/5/16 Marc Glisse <>
On Mon, 16 May 2011, Sebastien Loriot (GeometryFactory) wrote: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).
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);}
--
Marc Glisse
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
- [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.