Boost logo

Geometry :

Subject: [ggl] VS 2008 compiler error when using overlaps() with polygons
From: Vishnu (vrang3)
Date: 2011-09-28 15:23:05


Is boost::geometry::overlaps() not implemented for polygons? I get compiler
errors from the call to overlaps() below.

    typedef model::d2::point_xy<double> point_2d;
    typedef model::polygon<point_2d> polygon_2d;
    typedef model::box<point_2d> box_2d;
    polygon_2d poly1;
    ...
    polygon_2d poly2;
    ...
    bool b = boost::geometry::overlaps(poly1, poly2); // produces a compiler
errors

The errors are:
1
1>Compiling...
1>test_overlap_two_polys.cpp
1>d:\boost_1_47_0\boost\geometry\algorithms\overlaps.hpp(162) : error C2664:
'boost::mpl::assertion_failed' : cannot convert parameter 1 from
'boost::mpl::failed ************(__thiscall
boost::geometry::dispatch::overlaps&lt;Tag1,Tag2,Geometry1,Geometry2&gt;::NOT_OR_NOT_YET_IMPLEMENTED_FOR_THIS_GEOMETRY_TYPE::*
***********)(boost::mpl::assert_::types&lt;T1,T2&gt;)' to
'boost::mpl::assert<false>::type'
1> with
1> [
1> Tag1=boost::geometry::polygon_tag,
1> Tag2=boost::geometry::polygon_tag,
1> Geometry1=polygon_2d,
1> Geometry2=polygon_2d,
1> T1=polygon_2d,
1> T2=polygon_2d
1> ]
1> No constructor could take the source type, or constructor overload
resolution was ambiguous
1> d:\boost_1_47_0\boost\geometry\algorithms\overlaps.hpp(195) : see
reference to class template instantiation
'boost::geometry::dispatch::overlaps&lt;Tag1,Tag2,Geometry1,Geometry2&gt;'
being compiled
1> with
1> [
1> Tag1=boost::geometry::polygon_tag,
1> Tag2=boost::geometry::polygon_tag,
1> Geometry1=polygon_2d,
1> Geometry2=polygon_2d
1> ]
1>
d:\users\vishnu\boost-geometry-1_47_0\example\test_overlap_two_polys.cpp(70)
: see reference to function template instantiation 'bool
boost::geometry::overlaps&lt;polygon_2d,polygon_2d&gt;(const Geometry1
&,const Geometry2 &)' being compiled
1> with
1> [
1> Geometry1=polygon_2d,
1> Geometry2=polygon_2d
1> ]
1>d:\boost_1_47_0\boost\geometry\algorithms\overlaps.hpp(162) : error C2866:
'boost::geometry::dispatch::overlaps&lt;Tag1,Tag2,Geometry1,Geometry2&gt;::mpl_assertion_in_line_117'
: a const static data member of a managed type must be initialized at the
point of declaration
1> with
1> [
1> Tag1=boost::geometry::polygon_tag,
1> Tag2=boost::geometry::polygon_tag,
1> Geometry1=polygon_2d,
1> Geometry2=polygon_2d
1> ]
1>d:\boost_1_47_0\boost\geometry\algorithms\overlaps.hpp(195) : error C2039:
'apply' : is not a member of
'boost::geometry::dispatch::overlaps&lt;Tag1,Tag2,Geometry1,Geometry2&gt;'
1> with
1> [
1> Tag1=boost::geometry::polygon_tag,
1> Tag2=boost::geometry::polygon_tag,
1> Geometry1=polygon_2d,
1> Geometry2=polygon_2d
1> ]
1>d:\boost_1_47_0\boost\geometry\algorithms\overlaps.hpp(195) : error C3861:
'apply': identifier not found

--
View this message in context: http://boost-geometry.203548.n3.nabble.com/VS-2008-compiler-error-when-using-overlaps-with-polygons-tp3372898p3372898.html
Sent from the Boost Geometry mailing list archive at Nabble.com.

Geometry list run by mateusz at loskot.net