From 795418e2addde69a06ca8547589ed30ab9075be6 Mon Sep 17 00:00:00 2001 From: Ivan Shynkarenka Date: Mon, 5 Apr 2021 18:16:24 +0300 Subject: [PATCH] Fixing VS2019 warning C4127: conditional expression is constant --- include/fmt/core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index 7d2ba5ac..dae7a2ff 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -396,7 +396,7 @@ template class basic_string_view { FMT_CONSTEXPR #endif FMT_INLINE basic_string_view(const Char* s) : data_(s) { - if (std::is_same::value && !detail::is_constant_evaluated()) + if (detail::const_check(std::is_same::value && !detail::is_constant_evaluated())) size_ = std::strlen(reinterpret_cast(s)); else size_ = std::char_traits::length(s);