From 8ce0e2fd979f4745348f3f3f8c10a809b6ab840b Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Thu, 3 Feb 2022 22:50:04 +0100 Subject: [PATCH] Update Duration.h --- src/common/Utilities/Duration.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/Utilities/Duration.h b/src/common/Utilities/Duration.h index 2a7e83d323..1e36e8627a 100644 --- a/src/common/Utilities/Duration.h +++ b/src/common/Utilities/Duration.h @@ -48,8 +48,8 @@ using Years = std::chrono::years; /// Months shorthand typedef. using Months = std::chrono::months; +// Fix GCC for C++20 #if GCC_VERSION - /// days using Days = duration<_GLIBCXX_CHRONO_INT64_T, ratio<86400>>; @@ -62,6 +62,8 @@ using Years = duration<_GLIBCXX_CHRONO_INT64_T, ratio<31556952>>; /// months using Months = duration<_GLIBCXX_CHRONO_INT64_T, ratio<2629746>>; +#endif // GCC_VERSION + #else /// Days shorthand typedef. (delete after start support c++20) using Days = std::chrono::duration, Hours::period>>;