Skip to content

Commit

Permalink
insert else branch to avoid unreachable code warning (#4130)
Browse files Browse the repository at this point in the history
at least MSC caused warning C4702: unreachable code
  • Loading branch information
torsten48 authored Aug 28, 2024
1 parent a3f3f2e commit bbf8b3b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/fmt/compile.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,9 @@ template <typename Char, typename T, int N> struct field {
if constexpr (std::is_convertible<T, basic_string_view<Char>>::value) {
auto s = basic_string_view<Char>(arg);
return copy<Char>(s.begin(), s.end(), out);
} else {
return write<Char>(out, arg);
}
return write<Char>(out, arg);
}
};

Expand Down

0 comments on commit bbf8b3b

Please sign in to comment.