Hi,

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:

template <size_t Max, size_t Min>
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>,
        insert_default_tag,
        choose_by_content_diff_tag,
        split_default_tag,
        linear_tag,
        node_s_mem_static_tag
    > type;
};

    
}}}}}

/*...*/

typedef
my_linear<32, 8> params_t;
/*...*/
typedef bgi::rtree<rtree_value_type, params_t, indexable_t, equal_to_t, rtree_allocator_t> rtree_t;

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.

Regards,
Adam