|
Boost : |
Subject: [boost] [math] svn rev 48294 (2008-08-22) breaks gcc 3.2 builds
From: Ralf W. Grosse-Kunstleve (rwgk_at_[hidden])
Date: 2008-09-04 15:12:48
Hi,
This svn revision...
------------------------------------------------------------------------
r48294 | johnmaddock | 2008-08-22 05:51:40 -0700 (Fri, 22 Aug 2008) | 1 line
Merged changes from sandbox, and regenerated the docs.
------------------------------------------------------------------------
broke our gcc 3.2 builds. (Sorry I couldn't report this earlier; I was out of town.)
The minimal reproducer is simply:
#include <boost/math/special_functions/atanh.hpp>
% g++ -c -Iboost atanh.cpp
In file included from boost/boost/math/special_functions/atanh.hpp:24,
from atanh.cpp:1:
boost/boost/math/special_functions/log1p.hpp:456: new declaration `
template<class T> T boost::math::log1pmx(T)'
boost/boost/math/special_functions/math_fwd.hpp:491: ambiguates old declaration
`template<class T> boost::math::tools::promote_args<RT, float, float, float,
float, float>::type boost::math::log1pmx(T)'
% g++ --version
g++ (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-20)
I can make the error go away with the simple-minded patch below, just to prove that the ifdefed-out
code is the only problem for us.
I'd be happy to try out ideas for proper workarounds.
Ralf
Index: boost/math/special_functions/log1p.hpp
===================================================================
--- boost/math/special_functions/log1p.hpp (revision 48578)
+++ boost/math/special_functions/log1p.hpp (working copy)
@@ -451,11 +451,13 @@
return result;
}
+#if !(defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ == 2)
template <class T>
inline T log1pmx(T x)
{
return log1pmx(x, policies::policy<>());
}
+#endif
} // namespace math
} // namespace boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk