Boost logo

Boost :

From: Leopoldo Peralta (lperalta_at_[hidden])
Date: 2007-07-01 11:48:31


This Error occurs (MSVC 2003 + SP1) when calling boost::math::log1p

-------------------
c:\boost_1_34_0_beta\boost_1_34_0\boost\math\special_functions\log1p.hpp(83)
: error C2784: 'boost::rational<IntType> boost::abs(const
boost::rational<IntType> &)' : could not deduce template argument for 'const
boost::rational<IntType> &' from
'boost::math::tools::promote_args<T1,T2,T3,T4,T5,T6>::type'
        with
        [
            T1=double,
            T2=float,
            T3=float,
            T4=float,
            T5=float,
            T6=float
        ]
-------------------

Same error is thrown when trying to call boost::math::complex functions.

Any fix to this?

Leopoldo Peralta

-----Mensaje original-----
De: boost-bounces_at_[hidden] [mailto:boost-bounces_at_[hidden]] En
nombre de John Maddock
Enviado el: Saturday, April 28, 2007 12:36 PM
Para: boost_at_[hidden]
Asunto: Re: [boost] [math toolkit]

Leopoldo Peralta wrote:
> This Fatal Error occurs when trying to compile a MSVC 2003 (SP1)
> project using the proposed Math Toolkit:

> Any fix to this error?

Most strange, VC8 handles it fine, and it appears to be a comiler bug, but I

can't find a workaround at present, so the diff below is the only fix I have

for now.

John.

Index: ../../../boost/math/special_functions/log1p.hpp
===================================================================
RCS file:
/cvsroot/boost-sandbox/boost-sandbox/boost/math/special_functions/Atti
c/log1p.hpp,v
retrieving revision 1.1.2.11
diff -u -r1.1.2.11 log1p.hpp
--- ../../../boost/math/special_functions/log1p.hpp 6 Feb 2007
13:32:59 -0000 1.1.2.11
+++ ../../../boost/math/special_functions/log1p.hpp 28 Apr 2007
17:34:33 -0000
@@ -172,7 +172,7 @@
          BOOST_CURRENT_FUNCTION);
    return ::log1p(x);
 }
-#elif defined(_MSC_VER)
+#elif defined(_MSC_VER) && (BOOST_MSVC >= 1400)
 //
 // You should only enable this branch if you are absolutely sure
 // that your compilers optimizer won't mess this code up!!

_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk