set不是boost :: PolygonSet

时间:2015-07-01 10:49:10

标签: c++ c++11 boost boost-polygon

我正试图超载& PolygonSet的运算符,但以跟随错误结束。我可以理解boost :: PolygonSet没有set功能,但任何人都可以提供输入来解决这个问题。我尝试过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中没有名为'type'的类型   提高:: enable_if,   boost :: polygon :: point_data&gt;'

编译时

消息

  

/u/logic/depot/boost_1_57_0/include/boost/polygon/detail/polygon_set_view.hpp:198:5:   'geometry_type_1&amp ;;   boost :: polygon :: self_assignment_boolean_op(geometry_type_1&amp;,const   geometry_type_2&amp;)[with geometry_type_1 =   的std ::向量; 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需要,   类型名   升压::多边形:: is_any_polygon_set_type ::类型&GT; ::类型,   geometry_type_1&GT; ::类型&安培;   boost :: polygon :: operators :: operator&amp; =(geometry_type_1&amp;,const   geometry_type_2&amp;)[with geometry_type_1 =   的std ::向量; geometry_type_2 =   boost_geom_api :: PolygonSet; typename boost :: enable_if      

升压::多边形:: is_mutable_polygon_set_type ::类型,   类型名   升压::多边形:: is_any_polygon_set_type ::类型&GT; ::类型,   geometry_type_1&gt; :: 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:   错误:没有名为'coordinate_type'的类型   'boost :: polygon :: get_coordinate_type :: traits_type {aka struct   升压::多边形:: polygon_set_traits}”

     从'typename boost :: enable_if :: type中需要,   类型名   升压::多边形:: is_any_polygon_set_type ::类型&GT; ::类型,   geometry_type_1&GT; ::类型&安培;   boost :: polygon :: operators :: operator&amp; =(geometry_type_1&amp;,const   geometry_type_2&amp;)[with geometry_type_1 =   的std ::向量; geometry_type_2 =   的std ::向量;类型名   提高:: enable_if ::类型,   类型名   升压::多边形:: is_any_polygon_set_type ::类型&GT; ::类型,   geometry_type_1&gt; :: type = std :: vector]'

0 个答案:

没有答案