Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#10861 closed Bugs (fixed)

Can't compile rtree.remove in 1.56 and 1.57 (1.55 works fine)

Reported by: apl@… Owned by: awulkiew
Milestone: Boost 1.58.0 Component: geometry
Version: Boost 1.57.0 Severity: Problem
Keywords: geometry rtree Cc:

Description

See attached file. It can be compiled with boost 1.55 but not in 1.56 and 1.57.

Attachments (1)

test2.cpp (1.4 KB) - added by apl@… 4 years ago.
testcase

Download all attachments as: .zip

Change History (4)

Changed 4 years ago by apl@…

Attachment: test2.cpp added

testcase

comment:1 Changed 4 years ago by Barend Gehrels

Owner: changed from Barend Gehrels to awulkiew

comment:2 Changed 4 years ago by awulkiew

Resolution: fixed
Status: newclosed
Version: Boost 1.57.0Boost 1.58.0

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;

comment:3 Changed 4 years ago by awulkiew

Milestone: To Be DeterminedBoost 1.58.0
Version: Boost 1.58.0Boost 1.57.0
Note: See TracTickets for help on using tickets.