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: 2016-02-16 19:38:13


#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 johnmaddock):

 If you add the following before including the Eigen headers does it fix
 things?

 {{{
 namespace boost { namespace multiprecision {

    template <class Backend, class tag, class A1, class A2, class A3, class
 A4>
    inline number<Backend, et_on> min(const number<Backend, et_on>& arg,
 const detail::expression<tag, A1, A2, A3, A4>& a)
    {
       number<Backend, et_on> t(a);
       return (std::min)(arg, t);
    }
    template <class tag, class A1, class A2, class A3, class A4, class
 Backend>
    inline number<Backend, et_on> min(const detail::expression<tag, A1, A2,
 A3, A4>& arg, const number<Backend, et_on>& a)
    {
       number<Backend, et_on> t(arg);
       return (std::min)(arg, a);
    }
    template <class tag, class A1, class A2, class A3, class A4, class
 tagb, class A1b, class A2b, class A3b, class A4b>
    inline typename detail::expression<tag, A1, A2, A3, A4>::result_type
 min(const detail::expression<tag, A1, A2, A3, A4>& arg, const
 detail::expression<tagb, A1b, A2b, A3b, A4b>& a)
    {
       number<Backend, et_on> t1(arg), t2(a);
       return (std::min)(arg, a);
    }

    template <class Backend, class tag, class A1, class A2, class A3, class
 A4>
    inline number<Backend, et_on> max(const number<Backend, et_on>& arg,
 const detail::expression<tag, A1, A2, A3, A4>& a)
    {
       number<Backend, et_on> t(a);
       return (std::max)(arg, t);
    }
    template <class tag, class A1, class A2, class A3, class A4, class
 Backend>
    inline number<Backend, et_on> max(const detail::expression<tag, A1, A2,
 A3, A4>& arg, const number<Backend, et_on>& a)
    {
       number<Backend, et_on> t(arg);
       return (std::max)(arg, a);
    }
    template <class tag, class A1, class A2, class A3, class A4, class
 tagb, class A1b, class A2b, class A3b, class A4b>
    inline typename detail::expression<tag, A1, A2, A3, A4>::result_type
 max(const detail::expression<tag, A1, A2, A3, A4>& arg, const
 detail::expression<tagb, A1b, A2b, A3b, A4b>& a)
    {
       number<Backend, et_on> t1(arg), t2(a);
       return (std::max)(arg, a);
    }

 } }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11149#comment:6>
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:19 UTC