From bbf8b3bd01781ffce7b933786d2a95d98b0755aa Mon Sep 17 00:00:00 2001 From: torsten48 <59708557+torsten48@users.noreply.github.com> Date: Thu, 29 Aug 2024 01:43:12 +0200 Subject: [PATCH] insert else branch to avoid unreachable code warning (#4130) at least MSC caused warning C4702: unreachable code --- include/fmt/compile.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/fmt/compile.h b/include/fmt/compile.h index 36dd367d56ac..63fa19a9963e 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -143,8 +143,9 @@ template struct field { if constexpr (std::is_convertible>::value) { auto s = basic_string_view(arg); return copy(s.begin(), s.end(), out); + } else { + return write(out, arg); } - return write(out, arg); } };