This is the mail archive of the
libstdc++@sources.redhat.com
mailing list for the libstdc++ project.
Re: abs(int) missing
- To: lfarkas at mindmaker dot hu
- Subject: Re: abs(int) missing
- From: Steven King <sxking at uswest dot net>
- Date: Thu, 17 Aug 2000 08:48:28 -0700
- Cc: libstdc++ at sourceware dot cygnus dot com
- Organization: is the root of all evil
- References: <399BDEA9.924810AE@mindmaker.hu> <00081708301100.00792@rigel> <399C06F8.904D5FAE@mindmaker.hu>
- Reply-To: sxking at uswest dot net
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