Use the same rep type for seconds to prevent overflow

This commit is contained in:
Victor Zverovich committed 2019-05-04 09:22:09 -07:00
1 parent 241414028d
commit 38a85502ed
2 files changed
+23 -7

No files matched your search

+4
View File
@@ -306,4 +306,8 @@ TEST(ChronoTest, InvalidColons) {
fmt::format_error);
}
TEST(ChronoTest, LargeDuration) {
EXPECT_EQ("40", fmt::format("{:%S}", std::chrono::duration<double>(1e20)));
}
#endif // FMT_STATIC_THOUSANDS_SEPARATOR