Re: [Boost-bugs] [Boost C++ Libraries] #10861: Can't compile rtree.remove in 1.56 and 1.57 (1.55 works fine)

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #10861: Can't compile rtree.remove in 1.56 and 1.57 (1.55 works fine)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-12-11 22:12:04


#10861: Can't compile rtree.remove in 1.56 and 1.57 (1.55 works fine)
-------------------------------+----------------------------
  Reporter: apl@… | Owner: awulkiew
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: geometry
   Version: Boost 1.58.0 | Severity: Problem
Resolution: fixed | Keywords: geometry rtree
-------------------------------+----------------------------
Changes (by awulkiew):

 * status: new => closed
 * version: Boost 1.57.0 => Boost 1.58.0
 * resolution: => fixed

Comment:

 The problem was located in the default bgi::equal_to<> function object. As
 a workaround a user-defined one could be passed to the rtree:


 {{{
 typedef std::pair<GeometryBox, GeometryPolygon * > Value;

 struct equal_to
 {
     bool operator()(Value const& v1, Value const& v2) const
     {
         return boost::geometry::equals(v1.first, v2.first)
             && v1.second == v2.second;
     }
 };

 boost::geometry::index::rtree
     <
       Value,
       boost::geometry::index::linear<16>,
       boost::geometry::index::indexable<Value>,
       equal_to
> rtree;
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10861#comment:2>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:17 UTC