Subject: [ggl] Surprising ADL
From: Bruno Lalande (bruno.lalande)
Date: 2010-05-07 09:07:58
> Talking of ADL, I also found some part of the lib use qualified call to
> stdlib functions, which will forbid the use of ADL.
> For example, in
> boost::geometry::detail::overlay::enrich_containment::enrich(), the
> qualified std::abs() will forbid the user from using his own abs() for UDT.
Good catch, we indeed have to remove all those qualified calls to enable ADL.
> Furthermore, I am not so clear about what kind of UDT can be used as
> coordinate type. From my point of view, it seems the lib suppose the
> standard arithmetic operations are supported for all the built-in
> type(especially, floating point types). And the UDT is based on such
> assumption. For example, if user uses some fixed point type as coordinate
> type, and expects the lib to act upon the fixed point arithmetic(coming with
> the fixed point type), he will not get what he wants(e.g., distance
> algorithm won't compile, since there is no proper result type).
The plan is to accept as a coordinate type any type which is
compatible with the Boost.Math bindings, which provides wrappers
around 3rd party numeric types to enable their use with ADL and usual
Geometry list run by mateusz at loskot.net