690. abs(long long) should return long long

Section: 29.9 [c.math] Status: NAD Editorial Submitter: Niels Dekker Opened: 2007-06-10 Last modified: 2016-02-10

Priority: Not Prioritized

View all other issues in [c.math].

View all issues with NAD Editorial status.

Discussion:

Quoting the latest draft (n2135), 29.9 [c.math]:

The added signatures are:

long abs(long); // labs()
long abs(long long); // llabs()

Shouldn't abs(long long) have long long as return type?

Proposed resolution:

Change 29.9 [c.math]:

long long abs(long long); // llabs()

Rationale:

Had already been fixed in the WP by the time the LWG reviewed this.