Fix precision 0 with std::chrono::duration and added additional tests. (#2588)
This commit is contained in:
@@ -923,8 +923,8 @@ template <typename Char, typename Rep, typename OutputIt,
|
||||
OutputIt format_duration_value(OutputIt out, Rep val, int precision) {
|
||||
auto specs = basic_format_specs<Char>();
|
||||
specs.precision = precision;
|
||||
specs.type = precision > 0 ? presentation_type::fixed_lower
|
||||
: presentation_type::general_lower;
|
||||
specs.type = precision >= 0 ? presentation_type::fixed_lower
|
||||
: presentation_type::general_lower;
|
||||
return write<Char>(out, val, specs);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user