Boost logo

Boost Users :

Subject: [Boost-users] [boost::polygon::operators] Boolean operations compiler error
From: Dimitris Dakopoulos (dakopoulos_at_[hidden])
Date: 2011-10-17 05:46:09


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 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