I am trying to overload & operator for PolygonSet but end with following error. I can understand boost::PolygonSet does not have set function but can anyone provide me input to fix this issue. I have tried view_as but did not success.
The code:
PolygonSet PolygonSet::operator&(const PolygonSet& right) const {
using namespace boost::polygon::operators;
PolygonSet ps (*this);
ps &= right;
return ps;
}
Error:
/u/logic/depot/boost_1_57_0/include/boost/polygon/detail/polygon_set_view.hpp:199:5: error: ‘set’ is not a member of ‘boost::polygon::polygon_set_mutable_traits’
Message during compilation required from here
/u/logic/depot/boost_1_57_0/include/boost/polygon/polygon_90_set_traits.hpp:57:51: error: no type named ‘coordinate_type’ in ‘boost::polygon::get_coordinate_type::traits_type {aka struct boost::polygon::polygon_set_traits}’ In file included from /u/logic/depot/boost_1_57_0/include/boost/polygon/polygon_set_data.hpp:999:0, from /u/logic/depot/boost_1_57_0/include/boost/polygon/polygon.hpp:81, from /home /cpp/src/boost_geom_api/common_headers.hpp:4,
/u/logic/depot/boost_1_57_0/include/boost/polygon/detail/polygon_set_view.hpp: In instantiation of ‘geometry_type_1& boost::polygon::self_assignment_boolean_op(geometry_type_1&, const geometry_type_2&) [with geometry_type_1 = boost_geom_api::PolygonSet; 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: required from ‘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 = boost_geom_api::PolygonSet; geometry_type_2 = boost_geom_api::PolygonSet; typename boost::enable_if::type, typename boost::polygon::is_any_polygon_set_type::type>::type, geometry_type_1>::type = boost_geom_api::PolygonSet]’
Aucun commentaire:
Enregistrer un commentaire