std:: formatter <std::stacktrace_entry>
From cppreference.net
<
cpp
|
utility
|
stacktrace entry
C++
Diagnostics library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::stacktrace_entry
| Member functions | ||||
| Observers | ||||
| Query | ||||
| Non-member functions | ||||
| Helper classes | ||||
|
formatter
<std::stacktrace_entry>
|
|
定义于头文件
<stacktrace>
|
||
|
template
<>
struct formatter < std:: stacktrace_entry > ; |
(C++23 起) | |
针对 std::formatter 的 std::stacktrace_entry 模板特化允许用户通过格式化函数(例如 std::format )将堆栈轨迹条目对象转换为字符串。
格式规范
格式规范的语法如下:
| fill-and-align (可选) width (可选) | |||||||||
fill-and-align 和 width 的含义与 标准格式规范 中的定义相同。
格式化输出的结果与
to_string
的输出一致,并根据格式说明符进行了相应调整。
示例
|
本节内容不完整
原因:缺少示例 |
参见
|
(C++20)
|
为给定类型定义格式化规则
(类模板) |
|
(C++23)
|
使用参数的
格式化
表示输出到
stdout
或文件流
(函数模板) |