std::formattable
定义于头文件 <format> |
||
template< class T, class CharT > concept formattable = /* formattable_with */< |
(1) | (C++23 起) |
帮助模板 |
||
template< class CharT > using /* fmt_iter_for */ = /* unspecified */; |
(2) | (仅作说明*) |
template< class T, class Context, class Formatter = |
(3) | (仅作说明*) |
概念 formattable
指定 std::formatter<std::remove_cvref_t<T>, CharT> 满足 BasicFormatter 和 Formatter 的要求(如果 std::remove_reference_t<T> 是 const-qualified)。
仅用于说明的别名模板 /* fmt_iter_for */ 产生一个未指定类型,该类型满足 std::output_iterator<const CharT&>。
[编辑] 缺陷报告
下列更改行为的缺陷报告追溯地应用于以前出版的 C++ 标准。
缺陷报告 | 应用于 | 发布时的行为 | 正确的行为 |
---|---|---|---|
LWG 3925 | C++23 | 未提供 std::basic_format_context 的第二个模板参数 | 已提供 |
[编辑] 参见
(C++20) |
定义给定类型的格式化规则 (类模板) |
(C++20) |
抽象给定格式化参数类型和字符类型的格式化操作 (命名要求) |
(C++20) |
定义 格式化库 使用的函数 (命名要求) |