Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qualify make_format_args #2315

Merged
merged 1 commit into from
May 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions include/fmt/os.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ FMT_API std::system_error vwindows_error(int error_code, string_view format_str,
template <typename... Args>
std::system_error windows_error(int error_code, string_view message,
const Args&... args) {
return vwindows_error(error_code, message, make_format_args(args...));
return vwindows_error(error_code, message, fmt::make_format_args(args...));
}

// Reports a Windows error without throwing an exception.
Expand Down Expand Up @@ -269,7 +269,7 @@ class buffered_file {

template <typename... Args>
inline void print(string_view format_str, const Args&... args) {
vprint(format_str, make_format_args(args...));
vprint(format_str, fmt::make_format_args(args...));
}
};

Expand Down Expand Up @@ -438,7 +438,7 @@ class FMT_API ostream final : private detail::buffer<char> {
*/
template <typename... T> void print(format_string<T...> fmt, T&&... args) {
vformat_to(detail::buffer_appender<char>(*this), fmt,
make_format_args(args...));
fmt::make_format_args(args...));
}
};

Expand Down
8 changes: 4 additions & 4 deletions include/fmt/printf.h
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ template <typename S, typename... T,
typename Char = enable_if_t<detail::is_string<S>::value, char_t<S>>>
inline auto sprintf(const S& fmt, const T&... args) -> std::basic_string<Char> {
using context = basic_printf_context_t<Char>;
return vsprintf(to_string_view(fmt), make_format_args<context>(args...));
return vsprintf(to_string_view(fmt), fmt::make_format_args<context>(args...));
}

template <typename S, typename Char = char_t<S>>
Expand Down Expand Up @@ -649,7 +649,7 @@ inline auto vfprintf(
template <typename S, typename... T, typename Char = char_t<S>>
inline auto fprintf(std::FILE* f, const S& fmt, const T&... args) -> int {
using context = basic_printf_context_t<Char>;
return vfprintf(f, to_string_view(fmt), make_format_args<context>(args...));
return vfprintf(f, to_string_view(fmt), fmt::make_format_args<context>(args...));
}

template <typename S, typename Char = char_t<S>>
Expand All @@ -672,7 +672,7 @@ inline auto vprintf(
template <typename S, typename... T, FMT_ENABLE_IF(detail::is_string<S>::value)>
inline auto printf(const S& fmt, const T&... args) -> int {
return vprintf(to_string_view(fmt),
make_format_args<basic_printf_context_t<char_t<S>>>(args...));
fmt::make_format_args<basic_printf_context_t<char_t<S>>>(args...));
}

template <typename S, typename Char = char_t<S>>
Expand All @@ -699,7 +699,7 @@ template <typename S, typename... T, typename Char = char_t<S>>
inline auto fprintf(std::basic_ostream<Char>& os, const S& fmt,
const T&... args) -> int {
return vfprintf(os, to_string_view(fmt),
make_format_args<basic_printf_context_t<Char>>(args...));
fmt::make_format_args<basic_printf_context_t<Char>>(args...));
}

FMT_MODULE_EXPORT_END
Expand Down