【发布时间】:2015-09-10 11:51:21
【问题描述】:
我正在尝试使用 boost 库创建一个范围树,这是我的代码:
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/point.hpp>
#include <boost/geometry/geometries/box.hpp>
#include <boost/geometry/index/rtree.hpp>
#include <vector>
#include <iostream>
#include <boost/foreach.hpp>
namespace bg = boost::geometry;
namespace bgi = boost::geometry::index;
typedef bg::model::point<float, 2, bg::cs::cartesian> point;
typedef bg::model::box<point> box;
typedef std::pair<box, unsigned> value;
// create the rtree using default constructor
int main(){
bgi::rtree< value, bgi::linear<16> > rtree;
return 0;
}
但我收到此错误:
错误 1 错误 C2228:“.select_on_container_copy_construction”左侧必须有类/结构/联合
我正在使用 boost 版本 1_55_0 和 Visual Studio 2013。
【问题讨论】: