Boost logo

Geometry :

Subject: Re: [geometry] compiler error side_by_triangle boost_1_61_0
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2016-08-03 10:43:19


Hi Egon,

Egon Schaal_cadcons_de wrote:
>
> Hello
>
> I have a small example with brings compiler error
>
> E:\boost\boost_1_61_0\boost\geometry\strategies\cartesian\side_by_triangle.hpp:239:
> Fehler: no match for 'operator>' (operand types are 'promoted_type
> {aka boost::geometry::model::point<double, 2u,
> boost::geometry::cs::cartesian>}' and 'const promoted_type {aka const
> boost::geometry::model::point<double, 2u,
> boost::geometry::cs::cartesian>}')
>
> : s > zero ? 1
>
> ^
>
> Compiler is mingw53.0 and msvc 2015
>

It's because this strategy takes CalculationType as template parameter,
not PointType.
By default the CalculationType is deduced from coordinate types of
passed Points.
So you should modify your code like this:

bg::strategy::side::side_by_triangle<>::apply(_p1,_p3,_pt);

Regards,
Adam



Geometry list run by mateusz at loskot.net