This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.

### 3093. LWG 2294/2192 missed a `std::abs` overload

Section: 26.8.2 [c.math.abs], 17.2.2 [cstdlib.syn], 29.13.2 [cinttypes.syn] Status: New Submitter: Richard Smith Opened: 2018-03-30 Last modified: 2018-06-19

Priority: 3

View all issues with New status.

Discussion:

LWG 2192 changed the library specification so that you always get all the `std::abs` overloads for fundamental types if you get any of them.

Except that it missed one: `<cinttypes>` provides a `std::abs` (and `std::div`) overload for `intmax_t` if it's not `long long` (since LWG 1449). Presumably that one should also follow the `<cstdlib>`/`<cmath>` pattern and we should make the complete `abs` overload set available whenever any of the three headers is included? (And likewise we should make the complete `std::div` overload set available whenever either `<cstdlib>` or `<cinttypes>` is included.)

[2018-06-18 after reflector discussion]

Priority set to 3

Proposed resolution: