Boost logo

Boost Users :

Subject: Re: [Boost-users] [Boost.polygon.voronoi] [Boost.multiprecision] higher precision voronoi
From: John Maddock (boost.regex_at_[hidden])
Date: 2014-03-17 14:29:45


> What does seem to work for MSVC compiling is adding (somewhat inelegant) definition:
> namespace std {
> boost::multiprecision::number<boost::multiprecision::backends::cpp_dec_float<80> >
> sqrt(const boost::multiprecision::number<boost::multiprecision::backends::cpp_dec_float<80> >& in) {
> boost::multiprecision::backends::cpp_dec_float<80> v = in.canonical_value(in);
> return v.calculate_sqrt( );
> }
> }
>
> But gcc 4.8.2 compiling produces:

If you do that, then you need to define the std::sqrt overload *before*
any polygon library include, otherwise GCC is correct in not considering
the overload as a candidate, and MSVC is wrong in finding it.

John.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net