Boost logo

Boost :

From: Bronek Kozicki (brok_at_[hidden])
Date: 2004-08-23 04:48:17


Michael Stevens wrote:
> The problem appears to be the old std::abs is not defined for built in types.
> I sure the problem will non exist for ever in the Comeau library. It could
> also be due to the --vc71 compatibility flag being set.

Hi

again me :) This error goes away if you #include <cstdlib> in
boost/numeric/ublas/traits.hpp (see attached patch) , no need to update
boost/boost/numeric/ublas/config.hpp .

I've checked in standard (ISO/IEC 14882:2003, clause 26.5) and it seems
that both headers <cstdlib> and <cmath> are required to have full set of
overloads of std::abs (I asked on comp.std.c++ if it's intended). Anyway
I will send support request to Comeau asking about absence of float
version in <cmath> .

B.

boost/boost/numeric/ublas/traits.hpp
Index: boost/boost/numeric/ublas/traits.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/numeric/ublas/traits.hpp,v
retrieving revision 1.24
diff -u -a -b -w -r1.24 traits.hpp
--- boost/boost/numeric/ublas/traits.hpp 19 Aug 2004 06:37:05 -0000 1.24
+++ boost/boost/numeric/ublas/traits.hpp 23 Aug 2004 09:42:56 -0000
@@ -21,6 +21,7 @@
 #include <iterator>
 #include <complex>
 #include <cmath>
+#include <cstdlib>

 #include <boost/numeric/ublas/iterator.hpp>
 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_SFINAE)


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