Boost logo

Geometry :

Subject: [ggl] abs warning on Linux
From: V D (zedxz2)
Date: 2011-10-22 02:10:34


Hi Barend,

Is it possible to know what/where was the patch for this ? I'm trying to move to TTMath instead of double because I'm having precision problems.
But I cannot get it to compile because of abs.

I get errors such as:

boost/geometry/algorithms/detail/overlay/assign_parents.hpp:80: error: cannot convert ?ttmath::Big<1ul, 32ul>? to ?int? for argument ?1? to ?int abs(int)?
boost/geometry/strategies/cartesian/cart_intersect.hpp:350: error: cannot convert ?ttmath::Big<1ul, 32ul>? to ?int? for argument ?1? to ?int abs(int)?

Thanks,
-v

On Sep 14, 2011, at 10:07 AM, Barend Gehrels wrote:

> Hi,
>
>> Just wondering if you guys are aware of the following warning with floating-point coordinates on Linux:
>>
>> boost-1.47.0/include/boost/geometry/strategies/cartesian/cart_intersect.hpp:350: warning: passing ?double? for argument 1 to ?int abs(int)?
>> boost-1.47.0/include/boost/geometry/strategies/cartesian/cart_intersect.hpp:351: warning: passing ?double? for argument 1 to ?int abs(int)?
>>
>> This happens when running boost::geometry::intersection(my_polygon, my_box) where coordinate_type of points is double, the compiler doesn't like it since only int abs(int) seems to be available on that Linux distro O_o
>>
>
> Thanks for the message!
>
> This was not only a warning, it was indeed an error. It was already solved in the Trunk, indeed using geometry::math::abs
>
> Regards, Barend
>
> _______________________________________________
> ggl mailing list
> ggl_at_[hidden]
> http://lists.osgeo.org/mailman/listinfo/ggl

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/ggl/attachments/20111021/c0cecc9e/attachment.html


Geometry list run by mateusz at loskot.net