diff --git a/include/fmt/format.h b/include/fmt/format.h index e0ce5877..1bb5b3ff 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -549,8 +549,8 @@ FMT_CONSTEXPR inline size_t compute_width(string_view s) { struct count_code_points { size_t* count; FMT_CONSTEXPR void operator()(uint32_t cp, int error) const { - *count += - detail::to_unsigned(1 + + *count += detail::to_unsigned( + 1 + (error == 0 && cp >= 0x1100 && (cp <= 0x115f || // Hangul Jamo init. consonants cp == 0x2329 || // LEFT-POINTING ANGLE BRACKET〈 @@ -2543,8 +2543,8 @@ struct formatter, Char> { using formatter_type = conditional_t::value, - formatter()))>, + formatter()))>, Char>, detail::fallback_formatter>; @@ -2642,10 +2642,9 @@ std::basic_string to_string(const basic_memory_buffer& buf) { FMT_BEGIN_DETAIL_NAMESPACE template -void vformat_to( - buffer& buf, basic_string_view fmt, - basic_format_args>> args, - locale_ref loc) { +void vformat_to(buffer& buf, basic_string_view fmt, + basic_format_args>> args, + locale_ref loc) { auto out = buffer_appender(buf); if (fmt.size() == 2 && equal2(fmt.data(), "{}")) { auto arg = args.get(0); @@ -2659,8 +2658,7 @@ void vformat_to( buffer_context context; format_handler(buffer_appender out, basic_string_view str, - basic_format_args> args, - locale_ref loc) + basic_format_args> args, locale_ref loc) : parse_context(str), context(out, args, loc) {} void on_text(const Char* begin, const Char* end) { @@ -2897,7 +2895,7 @@ inline auto formatted_size(const S& fmt, Args&&... args) -> size_t { FMT_MODULE_EXPORT_END FMT_END_NAMESPACE -#ifdef FMT_DEPRECATED_WCHAR +#ifdef FMT_DEPRECATED_INCLUDE_WCHAR # include "wchar.h" #endif