![]() Using std::chrono::abs is only valid if numeric_limits<rep>::is_signed is true, so using it unconditionally made it ill-formed to format a duration with an unsigned rep. The duration formatter might as well negate the duration itself instead of using chrono::abs, because it already needs to check for a negative value. libstdc++-v3/ChangeLog: PR libstdc++/115668 * include/bits/chrono_io.h (formatter<duration<R,P, C>::format): Do not use chrono::abs. * testsuite/20_util/duration/io.cc: Check formatting a duration with unsigned rep. (cherry picked from commit dafa750c8a6f0a088677871bfaad054881737ab1) |
||
---|---|---|
.. | ||
arithmetic | ||
comparison_operators | ||
cons | ||
literals | ||
requirements | ||
114244.cc | ||
io.cc |