Boost logo

Geometry :

Subject: Re: [geometry] rtree crash when used with inter process
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2014-05-24 06:46:01


Gongyiling_boost wrote:
> that's great! Adam, i tried all the solutions you mentioned above,
> the my_linear_tag method failed to compile the insert method,
> compiler complains:
> D:\boost\boost_1_54_0\boost/geometry/index/rtree.hpp(1048): error C2664: "boost::geometry::index::detail::rtree::visitors::insert<Element,Value,Options,Translator,Box,Allocators,InsertTag>::insert(boost::interprocess::offset_ptr<PointedType,DifferenceType,OffsetType,OffsetAlignment> &,size_t &,const Value &,const boost::geometry::index::linear<MaxElements,MinElements> &,const Translator &,Allocators &,size_t)": cannot convert parameter 5 from "params_t" to "const boost::geometry::index::linear<MaxElements,MinElements> &"
Ah sorry about that! This should work:


struct my_linear : bgi::linear<Max, Min> {};

namespace boost { namespace geometry { namespace index { namespace detail { namespace rtree {

template <size_t MaxElements, size_t MinElements>

struct options_type< my_linear<MaxElements, MinElements> >


     typedef options<

         my_linear<MaxElements, MinElements>,






> type;





So this slightly more complicated but also more flexible since you may
define Max/Min in the place where the rtree is created.
But it probably should also be possible to use the tag-based approach.
I'll think about it and maybe prepare a patch...

> then i modified the boost/geometry/index/detail/rtree/options.hpp according to github, and it worked perfectly!

I'm glad it's ok.


Geometry list run by mateusz at