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-30 15:00:34
#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@â¦):
std::max/min are satisfactory, except for the fact that they don't accept
ETs. Also, if they happen to be called with matching ETs, you have to
evaluate both expressions (which you have to, anyways -- unless you have
an extra clever operator< overload), but the result will be evaluated once
more.
In Eigen we encapsulated max/min to maxi/mini functions in a separate
namespace. They are implemented using ADL with an empty macro preventing
max()/min() macro expansions.
We require ADL, since we support some scalar types which define max and
min in their own namespace.
I guess, you also define functions such as sqrt in your own namespace,
don't you?
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11149#comment:4> 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