diff --git a/include/fmt/std.h b/include/fmt/std.h index 1157e259..ff96a952 100644 --- a/include/fmt/std.h +++ b/include/fmt/std.h @@ -255,10 +255,8 @@ template auto write_escaped_alternative(OutputIt out, const T& v) -> OutputIt { if constexpr (has_to_string_view::value) return write_escaped_string(out, detail::to_string_view(v)); - else if constexpr (std::is_same_v) - return write_escaped_char(out, v); - else - return write(out, v); + if constexpr (std::is_same_v) return write_escaped_char(out, v); + return write(out, v); } } // namespace detail