set不是boost :: PolygonSet的成员
我正在尝试为PolygonSet重载&运算符,但以下列错误结束。 我可以理解boost :: PolygonSet没有设置功能,但任何人都可以提供我解决此问题的输入。 我尝试过view_as,但没有成功。
代码:
Function definition for concept
namespace boost { namespace polygon {
template <>
struct geometry_concept<boost_geom_api::PolygonSet> {
typedef polygon_set_concept type;
}; } }
PolygonSet PolygonSet::operator&(const PolygonSet& right) const {
using namespace boost::polygon::operators;
PolygonSet ps (*this);
ps &= right;
return ps;
}
PolygonSet& PolygonSet::operator&=(const PolygonSet& right) {
using namespace boost::polygon::operators;
using namespace gtl;
pgns &= right.pgns;
return (*this); }
错误 :
/polygon_set.cpp:160:19: required from here
/u/logic/depot/boost_1_57_0/include/boost/polygon/interval_concept.hpp:168:10:
错误:在'struct boost :: enable_if,boost :: polygon :: point_data>'中没有类型命名为'type'
编译期间的消息
/u/logic/depot/boost_1_57_0/include/boost/polygon/detail/polygon_set_view.hpp:198:5:需要从'geometry_type_1&boost :: polygon :: self_assignment_boolean_op(geometry_type_1&,const geometry_type_2&)[with geometry_type_1 = std :: vector ; geometry_type_2 = boost_geom_api :: PolygonSet; int op_type = 1]'/u/logic/depot/boost_1_57_0/include/boost/polygon/polygon_set_concept.hpp:419:90:需要从'typename boost :: enable_if :: type,typename boost :: polygon :: is_any_polygon_set_type: :type> :: type,geometry_type_1> :: type&boost :: polygon :: operators :: operator&=(geometry_type_1&,const geometry_type_2&)[with geometry_type_1 = std :: vector; geometry_type_2 = boost_geom_api :: PolygonSet; typename boost :: enable_if
boost :: polygon :: is_mutable_polygon_set_type :: type,typename boost :: polygon :: is_any_polygon_set_type :: type> :: type,geometry_type_1> :: type = std :: vector]'/polygon_set.cpp:160:13:必需从这里是/u/logic/depot/boost_1_57_0/include/boost/polygon/polygon_90_set_traits.hpp:57:51:错误:没有类型在'boost :: polygon :: get_coordinate_type :: traits_type {aka struct boost ::多边形:: polygon_set_traits}”
需要从'typename boost :: enable_if :: type,typename boost :: polygon :: is_any_polygon_set_type :: type> :: type,geometry_type_1> :: type&boost :: polygon :: operators :: operator&=(geometry_type_1&,const geometry_type_2&) [with geometry_type_1 = std :: vector; geometry_type_2 = std :: vector; typename boost :: enable_if :: type,typename boost :: polygon :: is_any_polygon_set_type :: type> :: type,geometry_type_1> :: type = std :: vector]'
链接地址: http://www.djcxy.com/p/29759.html