Re: [Boost-bugs] [Boost C++ Libraries] #11149: boost::multiprecision compilation fail with std::max

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11149: boost::multiprecision compilation fail with std::max
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-03-29 20:37:53


#11149: boost::multiprecision compilation fail with std::max
-------------------------------+----------------------------
  Reporter: minorlogic@… | Owner: johnmaddock
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: multiprecision
   Version: Boost 1.57.0 | Severity: Showstopper
Resolution: wontfix | Keywords:
-------------------------------+----------------------------

Comment (by chtz@…):

 Just some notes:
 First of all a crossreference to original issue:
 http://eigen.tuxfamily.org/bz/show_bug.cgi?id=982

 About overloading std::max:
 That is indeed (at least) bad style, however, you can very well implement
 a max/min function in your own namespace. Then the following would be
 possible (due to ADL):
 {{{
   using std::max;
   cpp_dec_float_50 x, y = max(x, 2*x);
 }}}

 Unfortunately, ADL does not work when writing (max) instead of max, which
 we originally did in Eigen (we replaced this by another mechanism
 meanwhile).

 I guess, we'll need to adapt our add <Scalar> arguments to our min/max-
 calls anyways, if we want to support ET-types.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11149#comment:2>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:18 UTC