diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 83b391580bd3..024a7baa740b 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,7 @@ +2000-08-21 Gabriel Dos Reis + + * bits/std_cmath.h (std::abs): Overload for int and long. + 2000-08-20 Benjamin Kosnik * src/string-inst.cc: Tweak instantiations for new-gxx-abi. diff --git a/libstdc++-v3/bits/std_cmath.h b/libstdc++-v3/bits/std_cmath.h index c25afa6c5527..dd21e4fa19fb 100644 --- a/libstdc++-v3/bits/std_cmath.h +++ b/libstdc++-v3/bits/std_cmath.h @@ -43,6 +43,16 @@ namespace std { + // + // int + // + + inline int abs(int i) + { return i < 0 ? i : -i; } + + inline long abs(long i) + { return i < 0 ? i : -i; } + // // float //