abs(int) missing

Steven King sxking@uswest.net
Thu Aug 17 08:52:00 GMT 2000


On Thu, 17 Aug 2000, Levente Farkas wrote:

> 
> #include <cmath>
> #include <cstdlib>
> int main()
> {
>   int i = std::abs(4);
>   return 0;
> }
> 
> g++ -fhonor-std test.cpp 
> test.cpp: In function `int main ()':
> test.cpp:5: call of overloaded `abs (int)' is ambiguous
> /usr/include/g++-v3/bits/std_cmath.h:52: candidates are: float std::abs (float)
> /usr/include/g++-v3/bits/std_cmath.h:262:                 double std::abs
> (double)
> /usr/include/g++-v3/bits/std_cmath.h:362:                 long double std::abs
> (long double)

  My apologies.  If you use the shadow headers, the ones I patched some
months ago, it should work (or atleast it does for me)

-- 
Steven King
sxking@uswest.net


More information about the Libstdc++ mailing list