使用boost :: geometry :: within编译错误

问题描述 投票:0回答:1

我正在尝试编译一个使用boost :: geometry :: within的程序,但是我收到以下错误:

/usr/include/boost/geometry/algorithms/within.hpp:实例化'bool boost :: geometry :: within(const Geometry1&,const Geometry2&)[with Geometry1 = legacy_point; Geometry2 = std :: vector]':glcanvas.cpp:1460:57:从这里需要/usr/include/boost/geometry/algorithms/within.hpp:295:55:错误:'apply'不是'的成员' boost :: geometry :: dispatch :: within,boost :: geometry :: point_tag,boost :: geometry :: multi_point_tag>

我的几何定义如下:

struct legacy_point{
float x, y, z;
};

BOOST_GEOMETRY_REGISTER_POINT_3D(legacy_point, float, cs::cartesian, x, y, z)
BOOST_GEOMETRY_REGISTER_MULTI_POINT(decltype(std::vector< legacy_point>{}))

我正在调用以下函数:

boost::geometry::within(point, conv_layer);

其中pointlegacy_point类型,conv_layerlegacy_point的矢量。我可以使用boost :: geometry :: distance函数但是在内部得到上面的错误。

c++ boost boost-geometry
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.