From 06f9953fa8916cde964f6e2ceea9936ea53b2fe6 Mon Sep 17 00:00:00 2001 From: offa Date: Thu, 29 Sep 2022 20:10:32 +0200 Subject: Workaround deprecation warning on Clang with C++20 --- include/spdlog/fmt/chrono.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/spdlog/fmt/chrono.h b/include/spdlog/fmt/chrono.h index 83fad2ff..edc56324 100644 --- a/include/spdlog/fmt/chrono.h +++ b/include/spdlog/fmt/chrono.h @@ -15,7 +15,14 @@ # define FMT_HEADER_ONLY # endif # endif +# if __cplusplus >= 202002L && defined(__clang__) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wdeprecated" // Workaround for Clang C++20; remove once fmt >= 9.x +# endif # include +# if __cplusplus >= 202002L && defined(__clang__) +# pragma clang diagnostic pop +# endif # else # include # endif -- cgit v1.2.3