
AMDG On 03/17/2014 08:57 AM, Weatherby,Gerard wrote:
Had polygon been coded like this:
template <typename T> T get_sqrt(const T& that) { using std::sqrt; return (sqrt)(that); // ADL is now active }
Then the correct overload would have been found.
Not quite true. The parentheses disable ADL, just as much as using a qualified name. To prevent macro expansion of sqrt while enabling ADL, you need to use: sqrt BOOST_PREVENT_MACRO_SUBSTITUTION (that)
<snip>
I tried both suggestions as best I understood them; changing the boost::polygon::voronoi get_sqrt implementation and changing my code as follows. (Aside: I realized I actually wanted 80, not 48 floating point bits).
namespace bmulti = boost::multiprecision; using bmulti::et_off; typedef bmulti::number<bmulti::cpp_dec_float<80>,et_off> floatingType;
Note: cpp_dec_float<80> has 80 /decimal/ digits, not 80 bits.
But still got: 1>d:\workspace\movingboundary\boost_1_53_0\boost\polygon\detail\voronoi_robust_fpt.hpp(61): error C2665: 'sqrt' : none of the 3 overloads could convert all the argument types
In Christ, Steven Watanabe