Skip to content

Commit bbf8b3b

Browse files
authored
insert else branch to avoid unreachable code warning (#4130)
at least MSC caused warning C4702: unreachable code
1 parent a3f3f2e commit bbf8b3b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

include/fmt/compile.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,9 @@ template <typename Char, typename T, int N> struct field {
143143
if constexpr (std::is_convertible<T, basic_string_view<Char>>::value) {
144144
auto s = basic_string_view<Char>(arg);
145145
return copy<Char>(s.begin(), s.end(), out);
146+
} else {
147+
return write<Char>(out, arg);
146148
}
147-
return write<Char>(out, arg);
148149
}
149150
};
150151

0 commit comments

Comments
 (0)