Subject: Re: [geometry] point on/intersects linestring?
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2013-09-04 14:33:28
Barend Gehrels wrote:
> On 4-9-2013 4:14, Adam Wulkiewicz wrote:
>> Btw, shouldn't geometry::promote_floating_point<> always promote to
>> raw floating point type? Currently boost::is_integral<T> trait is
>> used to check if this type should be promoted. If this type is some
>> class which means it's not intergal type, it isn't promoted to
>> floating point type. Shouldn't the test be changed to
>> !boost::is_float<T> ?
> No, because GMP or ttmath or any other floating point high precision
> number are not catched by that.
Just asking. I thought about converting rational<> to some floating
point number to workaround the lack of numeric_limits specialization but
rational can't be implicitly converted to a different type so this won't
> If there is any Integral high precision number, it is indeed a problem
> - is_integral will probably return false... That can be helped by (did
> not try) specializing that yourself. The library is as far as I know
> never tested for non-standard integral types.
> Of course we could do the same trick for floating point... (specialize
> is_float for ttmath). Then indeed we could change the test.
Or we could add another level of those type traits, e.g.
geometry::is_float<>, geometry::is_integral<>, geometry::is_unsigned<>
etc. to not interfere with the TypeTraits library. Then specialize them
for some known types like ttmath. But this is probably not the priority
Geometry list run by mateusz at loskot.net