From d57b2a652538984448da91390331806d530ecfce Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 8 Aug 2021 09:13:41 -0700 Subject: [PATCH] Suppress a warning --- include/fmt/chrono.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/include/fmt/chrono.h b/include/fmt/chrono.h index c024fd71..f3bf422d 100644 --- a/include/fmt/chrono.h +++ b/include/fmt/chrono.h @@ -308,7 +308,17 @@ inline auto do_write(const std::tm& time, const std::locale& loc, char format, #else using code_unit = char32_t; #endif - auto& f = std::use_facet>(loc); + + using codecvt = std::codecvt; +#if FMT_CLANG_VERSION +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wdeprecated" + auto& f = std::use_facet(loc); +# pragma clang diagnostic pop +#else + auto& f = std::use_facet(loc); +#endif + auto mb = std::mbstate_t(); const char* from_next = nullptr; code_unit* to_next = nullptr;