vcpkg/ports/fmt/fix-format-conflict.patch
Mengna Li 5dd5017f14
[fmt] fix format conflict (#25137)
* fix format conflict

* update

* update patch file
2022-07-05 15:58:12 -07:00

29 lines
1.2 KiB
Diff

diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h
index 2c51c50..fb3eba0 100644
--- a/include/fmt/format-inl.h
+++ b/include/fmt/format-inl.h
@@ -75,8 +75,8 @@ FMT_FUNC void format_error_code(detail::buffer<char>& out, int error_code,
error_code_size += detail::to_unsigned(detail::count_digits(abs_value));
auto it = buffer_appender<char>(out);
if (message.size() <= inline_buffer_size - error_code_size)
- format_to(it, FMT_STRING("{}{}"), message, SEP);
- format_to(it, FMT_STRING("{}{}"), ERROR_STR, error_code);
+ fmt::format_to(it, FMT_STRING("{}{}"), message, SEP);
+ fmt::format_to(it, FMT_STRING("{}{}"), ERROR_STR, error_code);
FMT_ASSERT(out.size() <= inline_buffer_size, "");
}
diff --git a/src/os.cc b/src/os.cc
index 04b4dc5..fe2c7e4 100644
--- a/src/os.cc
+++ b/src/os.cc
@@ -167,7 +167,7 @@ void detail::format_windows_error(detail::buffer<char>& out, int error_code,
if (msg) {
utf16_to_utf8 utf8_message;
if (utf8_message.convert(msg) == ERROR_SUCCESS) {
- format_to(buffer_appender<char>(out), "{}: {}", message, utf8_message);
+ fmt::format_to(buffer_appender<char>(out), "{}: {}", message, utf8_message);
return;
}
}