Created on 2020-01-16.00:00:00 last changed 46 months ago
Proposed resolution:
This wording is relative to N4842.
Edit [format.syn], header <format> synopsis, as indicated:
namespace std { […] template<class Out> Out vformat_to(Out out, string_view fmt, format_args_t<type_identity_t<Out>, char> args); template<class Out> Out vformat_to(Out out, wstring_view fmt, format_args_t<type_identity_t<Out>, wchar_t> args); template<class Out> Out vformat_to(Out out, const locale& loc, string_view fmt, format_args_t<type_identity_t<Out>, char> args); template<class Out> Out vformat_to(Out out, const locale& loc, wstring_view fmt, format_args_t<type_identity_t<Out>, wchar_t> args); […] }
Edit [format.functions] p8 through p10 as indicated:
template<class Out, class... Args> Out format_to(Out out, string_view fmt, const Args&... args); template<class Out, class... Args> Out format_to(Out out, wstring_view fmt, const Args&... args);-8- Effects: Equivalent to:
using context = basic_format_context<Out, decltype(fmt)::value_type>; return vformat_to(out, fmt,{make_format_args<context>(args...)});template<class Out, class... Args> Out format_to(Out out, const locale& loc, string_view fmt, const Args&... args); template<class Out, class... Args> Out format_to(Out out, const locale& loc, wstring_view fmt, const Args&... args);-9- Effects: Equivalent to:
using context = basic_format_context<Out, decltype(fmt)::value_type>; return vformat_to(out, loc, fmt,{make_format_args<context>(args...)});template<class Out> Out vformat_to(Out out, string_view fmt, format_args_t<type_identity_t<Out>, char> args); template<class Out> Out vformat_to(Out out, wstring_view fmt, format_args_t<type_identity_t<Out>, wchar_t> args); template<class Out> Out vformat_to(Out out, const locale& loc, string_view fmt, format_args_t<type_identity_t<Out>, char> args); template<class Out> Out vformat_to(Out out, const locale& loc, wstring_view fmt, format_args_t<type_identity_t<Out>, wchar_t> args);-10- Let charT be decltype(fmt)::value_type.
[…]
[ 2020-02-01 Status set to Tentatively Ready after six positive votes on the reflector. ]
vformat_to currently deduces Out from its first and last arguments. This requires its last argument's type to be a specialization of basic_format_args, which notably prevents the use of format-arg-store arguments directly. This is unnecessary: we should only deduce from the first argument.
History | |||
---|---|---|---|
Date | User | Action | Args |
2021-02-25 10:48:01 | admin | set | status: wp -> c++20 |
2020-02-24 16:02:59 | admin | set | status: immediate -> wp |
2020-02-14 06:37:09 | admin | set | status: ready -> immediate |
2020-02-01 13:12:42 | admin | set | messages: + msg10972 |
2020-02-01 13:12:42 | admin | set | status: new -> ready |
2020-01-17 03:58:59 | admin | set | messages: + msg10944 |
2020-01-16 00:00:00 | admin | create |