Boost logo

Boost :

From: Joerg Walter (jhr.walter_at_[hidden])
Date: 2003-02-03 05:19:54

Hi Julius,

you wrote:


> > IIRC the signatures 'float abs(float)' and 'double abs(double)' should
> > 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.

OK, this raises the question, if 26.5.5 and 26.5.6 must be read together or
if the overloads of 26.5.6 should be splitted into <cstdlib> and <cmath>
according to table 80/81.

> 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.

OK, I'll add #include <cstdlib> to ublas/traits.hpp. Does this solve the
original problem with .NET?



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