std::make_format_args, std::make_wformat_args_C++中文网
| 定义于头文件 |
||
| template<class Context = std::format_context, class... Args> |
(1) | (C++20 起) |
| template<class... Args> |
(2) | (C++20 起) |
返回存储格式化参数的数组,并可隐式转换到 std::basic_format_args<Context> 的对象。
若对 Args 中的任何 Ti , typename Context::template formatter_type<Ti> 不满足格式化器 (Formatter) 要求,则行为未定义。
参数
返回
保有格式化参数的对象。
注解
格式化参数对用户定义类型拥有引用语义而且不延长 args 的生命期。程序员负责确保 args 比返回值存活更久。通常结果仅用作格式化函数的参数。