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

Missing fmt::make_printf_args #687

Closed
Kronuz opened this issue Mar 21, 2018 · 1 comment
Closed

Missing fmt::make_printf_args #687

Kronuz opened this issue Mar 21, 2018 · 1 comment

Comments

@Kronuz
Copy link
Contributor

Kronuz commented Mar 21, 2018

I had to add Added fmt::make_printf_args to fmt/printf.h so I could pass arguments to fmt::vsprintf, as in

fmt::vsprintf(format, fmt::make_printf_args(std::forward<Args>(args)...));

This is my implementation of it:

template <typename ...Args>
inline arg_store<printf_context<internal::buffer>::type, Args...> make_printf_args(const Args & ... args) {
  return arg_store<printf_context<internal::buffer>::type, Args...>(args...);
}
@vitaut
Copy link
Contributor

vitaut commented Mar 21, 2018

Could you submit a PR?

Kronuz added a commit to Kronuz/fmt that referenced this issue Mar 26, 2018
vitaut pushed a commit that referenced this issue Mar 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants