From 25a9beedb0c47e3e0f1da4a7fac0773a43e33754 Mon Sep 17 00:00:00 2001 From: Ivan Shapovalov Date: Sat, 2 Dec 2023 19:12:49 +0400 Subject: [PATCH] test: add a fallback definition for std::chrono::days --- test/chrono-test.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/chrono-test.cc b/test/chrono-test.cc index b562a50ea4bf..7068c9799755 100644 --- a/test/chrono-test.cc +++ b/test/chrono-test.cc @@ -24,6 +24,12 @@ using testing::Contains; # define FMT_HAS_C99_STRFTIME 1 #endif +#if defined(__cpp_lib_chrono) && __cpp_lib_chrono >= 201907L +using days = std::chrono::days; +#else +using days = std::chrono::duration>; +#endif + auto make_tm() -> std::tm { auto time = std::tm(); time.tm_mday = 1;