23 General utilities library [utilities]

23.17 Time utilities [time]

23.17.5 Class template duration [time.duration]

23.17.5.9 duration algorithms [time.duration.alg]

template <class Rep, class Period> constexpr duration<Rep, Period> abs(duration<Rep, Period> d);

Remarks: This function shall not participate in overload resolution unless numeric_­limits<Rep>​::​is_­signed is true.

Returns: If d >= d.zero(), return d, otherwise return -d.