|
Geometry : |
Subject: [ggl] Surprising ADL
From: Bruno Lalande (bruno.lalande)
Date: 2010-07-12 05:50:04
Hi,
> The std::abs() required a trick, because without it is considered as C abs
> (taking an integer). I consulted #boost at IRC on it and they proposed the
> solution which is now there. The library calls geometry::math::abs()
> internally. That function calls "using std::abs" to get the right abs, and
> at the same time enable ADL.
If I remind correctly, that's what Boost.Math does to force any
unqualified call to look at std:: rather than C functions. There must
be a file somewhere in Boost.Math with a bunch of "using std::abs;
using std::sqrt; etc..." that any Boost.Math header includes.
Regards
Bruno
Geometry list run by mateusz at loskot.net