This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: abs(long long)


2012/10/2 Marc Glisse <marc.glisse@inria.fr>:
> Here I am talking of a library issue: the wording that says that there are
> sufficient overloads such that integer types call the double version of math
> functions. It is fairly obvious that it doesn't apply to abs(long) for
> instance which has an explicit overload. For short or unsigned, I still read
> it as saying that it converts to double...

This really looks like a problem of the Standard Library specification
to me and
a corresponding issue should be submitted. In fact the wording can be
interpreted
that mixing <cstdlib> with <cmath> would imply two different versions of
std::abs(int) because of different required return types. I will
prepare a corresponding
submission to the LWG.

- Daniel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]