Opened 5 years ago

Last modified 5 years ago

#13039 new Bugs

geometry::difference with multi_linestring and multi_polygon needs geometry.hpp to compile with MinGW/LLVM

Reported by: bruno.deligny@… Owned by: Barend Gehrels
Milestone: To Be Determined Component: geometry
Version: Boost 1.63.0 Severity: Problem
Keywords: Cc:

Description

Code highlighting:

boost::geometry::model::multi_polygon< boost::geometry::model::polygon< boost::geometry::model::d2::point_xy<float> , false, false> >      myMultiPolygon;
boost::geometry::model::multi_linestring< boost::geometry::model::linestring< boost::geometry::model::d2::point_xy<float> > >              myMultiLineString;
boost::geometry::model::multi_linestring< boost::geometry::model::linestring< boost::geometry::model::d2::point_xy<float> > >              myMultiLineStringOut;

boost::geometry::difference(myMultiLineString, myMultiPolygon, myMultiLineStringOut);

On MinGW 5.3.0 with QtCreator, it ouput: boost\boost\geometry\algorithms\detail\overlay\intersection_insert.hpp:403: error: no matching function for call to 'assertion_failed(mpl_::failed (boost::geometry::dispatch::intersection_insert<boost::geometry::model::multi_linestring<boost::geometry::model::linestring<boost::geometry::model::d2::point_xy<float> > >, boost::geometry::model::multi_polygon<boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<float>, false, false> >, boost::geometry::model::linestring<boost::geometry::model::d2::point_xy<float> >, (boost::geometry::overlay_type)2u, false, false, false, boost::geometry::multi_linestring_tag, boost::geometry::multi_polygon_tag, boost::geometry::linestring_tag, false, true, false>::NOT_OR_NOT_YET_IMPLEMENTED_FOR_THIS_GEOMETRY_TYPES_OR_ORIENTATIONS::)(mpl_::assert_::types<boost::geometry::model::multi_linestring<boost::geometry::model::linestring<boost::geometry::model::d2::point_xy<float> > >, boost::geometry::model::multi_polygon<boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<float>, false, false> >, boost::geometry::model::linestring<boost::geometry::model::d2::point_xy<float> >, mpl_::na>))'

BOOST_MPL_ASSERT_MSG

It works on Visual Studio 2015.

And it's the same with a line_string instead of the multi_linestring.

Change History (1)

comment:1 by bruno.deligny@…, 5 years ago

Summary: geometry::difference with multi_linestring and multi_polygon doesn't compile with MinGWgeometry::difference with multi_linestring and multi_polygon needs geometry.hpp to compile with MinGW/LLVM

It also doesn't compile on LLVM MacOSX/iOS either.

I included:

Code highlighting:

#include <boost/geometry/geometries/polygon.hpp>
#include <boost/geometry/geometries/multi_polygon.hpp>
#include <boost/geometry/geometries/linestring.hpp>
#include <boost/geometry/geometries/multi_linestring.hpp>
#include <boost/geometry/geometries/point_xy.hpp>
#include <boost/geometry/algorithms/difference.hpp>

I thought it was sufficient but it compile if i also include:

Code highlighting:

#include <boost/geometry.hpp>
Note: See TracTickets for help on using tickets.