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 限定的)。
仅供演示的别名模板 /* fmt_iter_for */ 产生一个未指定的类型,该类型满足 std::output_iterator<const CharT&>。
[编辑] 缺陷报告
以下行为更改缺陷报告已追溯应用于先前发布的 C++ 标准。
DR | 应用于 | 已发布行为 | 正确行为 |
---|---|---|---|
LWG 3925 | C++23 | std::basic_format_context 的第二个模板实参未提供 | 已提供 |
[编辑] 参见
(C++20) |
为给定类型定义格式化规则 (类模板) |
(C++20) |
为给定的格式化实参类型和字符类型抽象格式化操作 (命名要求) |
(C++20) |
定义 格式化库 使用的函数 (命名要求) |