Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] "unite" operation in MinKowski_2

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] "unite" operation in MinKowski_2


Chronological Thread 
  • 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:

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


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss





Archive powered by MHonArc 2.6.16.

Top of Page