From: Julius Muschaweck (muschaweck_at_[hidden])
Date: 2003-02-03 05:06:42
At 09:27 03.02.2003, you wrote:
>it looks as if your mail didn't find it's way to the boost ml. You wrote:
Sorry, I had a typo in the boost ml address. You included my message in
your reply, so I don't send it again.
> > (snipped)
>IIRC the signatures 'float abs(float)' and 'double abs(double)' should be
>part of <cmath>, which is included in <ublas/traits.hpp>.
I think they should, too, but they aren't. I don't know why, but the
Standard (Table 81, Section, 26.5, p596) puts abs, div, rand and srand into
cstdlib and all the others like sqrt and asin into cmath. The reason why
ublas/type_traits.hpp still compiles is that Microsoft says "using ::abs"
in cmath, although the Standard doesn't put it there.
By the way: VC 6 does have cmath and cstdlib headers, too. These headers
just import math.h and stdlib.h within namespace std brackets. This
apparently wasn't enough to convince boost to omit the
BOOST_NO_STDC_NAMESPACE #define for VC 6.
It seems that probably for legacy reasons most cmath headers declare abs,
at least as int abs(int), although it's seems to be against the Standard.
Otherwise you would have had many compiler errors already:
ublas::type_traits is fully specialized so they are always compiled. Still,
I think you maybe should #include <cstdlib> in ublas/type_traits to be
ready for a really conforming library implementation.
81245 Muenchen, Germany
Phone: +49 89 820050-30
Fax: +49 89 820050-41
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk