From bcfd9379214c9e909a6e08a94330c0c31f14e748 Mon Sep 17 00:00:00 2001 From: Patrick Roocks Date: Tue, 27 Sep 2022 08:12:09 +0200 Subject: [PATCH] require MSC version 1933 for utc_clock --- include/fmt/chrono.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index 1a8d8d04c2aa9..1b72990281faf 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -25,7 +25,9 @@ FMT_BEGIN_NAMESPACE // Check if std::chrono::utc_timestamp is available. #ifndef FMT_USE_UTC_TIME # ifdef __cpp_lib_chrono -# define FMT_USE_UTC_TIME (__cpp_lib_chrono >= 201907L) +# define FMT_USE_UTC_TIME \ + (__cpp_lib_chrono >= 201907L) && \ + (FMT_MSC_VERSION >= 1933 || FMT_MSC_VERSION == 0) # else # define FMT_USE_UTC_TIME 0 # endif