mirror of
https://github.com/fmtlib/fmt.git
synced 2025-08-01 03:34:45 +02:00
insert else branch to avoid unreachable code warning (#4130)
at least MSC caused warning C4702: unreachable code
This commit is contained in:
@@ -143,9 +143,10 @@ template <typename Char, typename T, int N> struct field {
|
|||||||
if constexpr (std::is_convertible<T, basic_string_view<Char>>::value) {
|
if constexpr (std::is_convertible<T, basic_string_view<Char>>::value) {
|
||||||
auto s = basic_string_view<Char>(arg);
|
auto s = basic_string_view<Char>(arg);
|
||||||
return copy<Char>(s.begin(), s.end(), out);
|
return copy<Char>(s.begin(), s.end(), out);
|
||||||
}
|
} else {
|
||||||
return write<Char>(out, arg);
|
return write<Char>(out, arg);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename Char, typename T, int N>
|
template <typename Char, typename T, int N>
|
||||||
|
Reference in New Issue
Block a user