Files
2025-10-25 03:02:53 +03:00

56 lines
1.7 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[stacktrace.format]
# 19 Diagnostics library [[diagnostics]](./#diagnostics)
## 19.6 Stacktrace [[stacktrace]](stacktrace#format)
### 19.6.5 Formatting support [stacktrace.format]
[🔗](#itemdecl:1)
`template<> struct formatter<stacktrace_entry>;
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/diagnostics.tex#L2362)
formatter<stacktrace_entry> interprets *format-spec* as a *stacktrace-entry-format-spec*[.](#1.sentence-1)
The syntax of format specifications is as follows:
stacktrace-entry-format-spec :
fill-and-alignopt widthopt
[*Note [1](#note-1)*:
The productions *fill-and-align* and *width* are described in [[format.string.std]](format.string.std "28.5.2.2Standard format specifiers")[.](#1.sentence-3)
— *end note*]
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/diagnostics.tex#L2377)
A stacktrace_entry object se is formatted as if by
copying to_string(se) through the output iterator of the context
with additional padding and adjustments as specified by the format specifiers[.](#2.sentence-1)
[🔗](#itemdecl:2)
`template<class Allocator> struct formatter<basic_stacktrace<Allocator>>;
`
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/diagnostics.tex#L2388)
For formatter<basic_stacktrace<Allocator>>,*format-spec* is empty[.](#3.sentence-1)
[4](#4)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/diagnostics.tex#L2392)
A basic_stacktrace<Allocator> object s is formatted as if by
copying to_string(s) through the output iterator of the context[.](#4.sentence-1)