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

: error C2784: 'boost::rational<IntType> boost::abs(const
boost::rational<IntType> &)' : could not deduce template argument for 'const
boost::rational<IntType> &' from

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.


Index: ../../../boost/math/special_functions/log1p.hpp
RCS file:
retrieving revision
diff -u -r1.1.2.11 log1p.hpp
--- ../../../boost/math/special_functions/log1p.hpp 6 Feb 2007
13:32:59 -0000
+++ ../../../boost/math/special_functions/log1p.hpp 28 Apr 2007
17:34:33 -0000
@@ -172,7 +172,7 @@
    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:

Boost list run by bdawes at, gregod at, cpdaniel at, john at