mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-19 11:14:41 +00:00
Name vfprintf
clashes with the identically named declaration in 'stdio.h' if that happens to be #included into the same TU. Fix this by using qualified name lookup instead of unqualified lookup that also enables ADL. (#3400)
This commit is contained in:
parent
eafcd3c8e1
commit
f449ca0525
@ -599,7 +599,7 @@ inline auto vsprintf(
|
||||
basic_format_args<basic_printf_context_t<type_identity_t<Char>>> args)
|
||||
-> std::basic_string<Char> {
|
||||
auto buf = basic_memory_buffer<Char>();
|
||||
vprintf(buf, detail::to_string_view(fmt), args);
|
||||
detail::vprintf(buf, detail::to_string_view(fmt), args);
|
||||
return to_string(buf);
|
||||
}
|
||||
|
||||
@ -626,7 +626,7 @@ inline auto vfprintf(
|
||||
basic_format_args<basic_printf_context_t<type_identity_t<Char>>> args)
|
||||
-> int {
|
||||
auto buf = basic_memory_buffer<Char>();
|
||||
vprintf(buf, detail::to_string_view(fmt), args);
|
||||
detail::vprintf(buf, detail::to_string_view(fmt), args);
|
||||
size_t size = buf.size();
|
||||
return std::fwrite(buf.data(), sizeof(Char), size, f) < size
|
||||
? -1
|
||||
|
Loading…
Reference in New Issue
Block a user