One could run a query on R-tree of boxes using a ring in boost 1.58.0 but not any longer. I could not find any relevant discussion but perhaps there is a good reason for this?
#include <vector>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/point_xy.hpp>
#include <boost/geometry/geometries/box.hpp>
#include <boost/geometry/geometries/polygon.hpp>
#include <boost/geometry/index/rtree.hpp>
void testSpacialIndexing()
{
namespace bg = boost::geometry;
namespace bgm = boost::geometry::model;
namespace bgi = boost::geometry::index;
typedef bgm::d2::point_xy<double> P;
typedef bgm::box<P> B;
P qpt;
B qbox;
bgm::ring<P> qring;
bgm::polygon<P> qpoly;
bgm::multi_polygon<bgm::polygon<P>> qmpoly;
bgm::segment<P> qseg;
bgm::linestring<P> qls;
// spacial indexing example
typedef std::pair<B, int> Value_t;
bgi::rtree<Value_t, bgi::quadratic<8>> rtree1;
std::vector<Value_t> found;
// works for all versions
rtree1.query(bgi::intersects(qpt), back_inserter(found));
rtree1.query(bgi::intersects(qbox), back_inserter(found));
rtree1.query(bgi::intersects(qseg), back_inserter(found));
rtree1.query(bgi::intersects(qls), back_inserter(found));
// does not work for 1.59 to 1.61 beta
rtree1.query(bgi::intersects(qring), back_inserter(found));
rtree1.query(bgi::intersects(qpoly), back_inserter(found));
rtree1.query(bgi::intersects(qmpoly), back_inserter(found));
}