-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Forwarding of args
in xchar.h
#3408
Comments
I'm currently working on a similar issue around Or I might be completely missing something. Here's a custom formatter I wrote for a reference: template<Deep T>
struct formatter<T> {
template<class CONTEXT>
constexpr auto parse(CONTEXT& ctx) {
return ctx.begin();
}
template<class CONTEXT>
auto format(T const& element, CONTEXT& ctx) {
const auto asText = static_cast<Debug>(element);
return fmt::vformat_to(ctx.out(), "{}", fmt::make_format_args(static_cast<std::string_view>(asText)));
}
}; This currently causes error C2664 on MSVC PP: I think this error was introduced in v. 10 |
@Epixu, return fmt::format_to(ctx.out(), "{}", static_cast<std::string_view>(asText)); |
Fixed |
In the same vein as #2462, I think that
format_to_n
inxchar.h
should take args asArgs&&...
instead ofconst Args&...
. Forformat_to
inxchar.h
this is already the case.make_wformat_args
should probably also be changed to matchmake_format_args
in forwarding theargs
.The text was updated successfully, but these errors were encountered: