|
Boost Users : |
Subject: Re: [Boost-users] [boost::polygon::operators] Boolean operations compiler error
From: Björn Piltz (bjornpiltz_at_[hidden])
Date: 2011-10-17 07:25:15
You could try:
boost::polygon::assign(p3, p1&p2);
Or, if you're using namespace boost::polygon::operators, you could write:
p3 = p1;
p3 &= p2;
2011/10/17 Dimitris Dakopoulos <dakopoulos_at_[hidden]>
> Hello all,
> I'm using a custom polygon set (PolygonCollection) according to the
> guidelines here:
> http://www.boost.org/doc/libs/1_47_0/libs/polygon/doc/gtl_custom_polygon_set.htm
> There is one case that I don't get any compiler error:
>
> PolygonCollection p1, p2;
> p1 & p2;
>
> There is this case that I do have an error:
>
> PolygonCollection p1, p2;
> PolygonCollection p3 = p1 & p2;
>
> The error is: error: conversion from
> 'boost::polygon::polygon_set_view<PolygonCollection, PolygonCollection, 1>'
> to non-scalar type 'PolygonCollection' requested
>
> There is also this case that I have a compiler error:
>
> PolygonCollection p1,p2,p3;
> p3 = p1 & p2;
>
> The error is:error: no match for 'operator=' in 'p3 =
> boost::polygon::operators::operator&(const geometry_type_1&, const
> geometry_type_2&) [with geometry_type_1 = PolygonCollection, geometry_type_2
> = PolygonCollection](((const PolygonCollection&)((const
> PolygonCollection*)(& p1))))'
> /xxx/Polygon.hpp:182: note: candidates are: PolygonCollection&
> PolygonCollection::operator=(const PolygonCollection&)
>
> (You can notice that I have overloaded the operator= for my custom polygon
> set but I got the same error without the suggestion before my
> implementation)
>
> Any ideas are welcomed!
>
> Dimitris
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net