std::formattable
在标头 <format> 定义 | ||
template<class T, class CharT > concept formattable =/* formattable_with */< | (1) | (C++23 起) |
辅助模板 | ||
template<class CharT > using/* fmt_iter_for */=/* 未指明 */; | (2) | (仅用于阐述*) |
template<class T, class Context, class Formatter = | (3) | (仅用于阐述*) |
概念 formattable
指定 std::formatter<std::remove_cvref_t<T>, CharT> 满足基本格式化器(BasicFormatter) 和(当 std::remove_reference_t<T> 有 const 限定时)格式化器(Formatter) 的要求。
仅用于阐释的别名模板 /* fmt_iter_for */ 产生满足 std::output_iterator<const CharT&> 的未指明类型。
[编辑]缺陷报告
下列更改行为的缺陷报告追溯地应用于以前出版的 C++ 标准。
缺陷报告 | 应用于 | 出版时的行为 | 正确行为 |
---|---|---|---|
LWG 3925 | C++23 | 未提供 std::basic_format_context 的第二模板实参 | 已提供 |
[编辑]参阅
(C++20) | 定义针对给定类型的格式化规则 (类模板) |
(C++20) | 针对给定格式化参数类型和字符类型抽象格式化操作 (具名要求) |
(C++20) | 定义格式化库使用的函数 (具名要求) |