From Jason Turner

[stacktrace.entry]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpfp_uis3c/{from.md → to.md} +115 -0
tmp/tmpfp_uis3c/{from.md → to.md} RENAMED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### Class `stacktrace_entry` <a id="stacktrace.entry">[[stacktrace.entry]]</a>
2
+
3
+ #### Overview <a id="stacktrace.entry.overview">[[stacktrace.entry.overview]]</a>
4
+
5
+ ``` cpp
6
+ namespace std {
7
+ class stacktrace_entry {
8
+ public:
9
+ using native_handle_type = implementation-defined // stacktrace_entry::native_handle_type;
10
+
11
+ // [stacktrace.entry.cons], constructors
12
+ constexpr stacktrace_entry() noexcept;
13
+ constexpr stacktrace_entry(const stacktrace_entry& other) noexcept;
14
+ constexpr stacktrace_entry& operator=(const stacktrace_entry& other) noexcept;
15
+
16
+ ~stacktrace_entry();
17
+
18
+ // [stacktrace.entry.obs], observers
19
+ constexpr native_handle_type native_handle() const noexcept;
20
+ constexpr explicit operator bool() const noexcept;
21
+
22
+ // [stacktrace.entry.query], query
23
+ string description() const;
24
+ string source_file() const;
25
+ uint_least32_t source_line() const;
26
+
27
+ // [stacktrace.entry.cmp], comparison
28
+ friend constexpr bool operator==(const stacktrace_entry& x,
29
+ const stacktrace_entry& y) noexcept;
30
+ friend constexpr strong_ordering operator<=>(const stacktrace_entry& x,
31
+ const stacktrace_entry& y) noexcept;
32
+ };
33
+ }
34
+ ```
35
+
36
+ An object of type `stacktrace_entry` is either empty, or represents a
37
+ stacktrace entry and provides operations for querying information about
38
+ it. The class `stacktrace_entry` models `regular` [[concepts.object]]
39
+ and `three_way_comparable<strong_ordering>` [[cmp.concept]].
40
+
41
+ #### Constructors <a id="stacktrace.entry.cons">[[stacktrace.entry.cons]]</a>
42
+
43
+ ``` cpp
44
+ constexpr stacktrace_entry() noexcept;
45
+ ```
46
+
47
+ *Ensures:* `*this` is empty.
48
+
49
+ #### Observers <a id="stacktrace.entry.obs">[[stacktrace.entry.obs]]</a>
50
+
51
+ ``` cpp
52
+ constexpr native_handle_type native_handle() const noexcept;
53
+ ```
54
+
55
+ The semantics of this function are *implementation-defined*.
56
+
57
+ *Remarks:* Successive invocations of the `native_handle` function for an
58
+ unchanged `stacktrace_entry` object return identical values.
59
+
60
+ ``` cpp
61
+ constexpr explicit operator bool() const noexcept;
62
+ ```
63
+
64
+ *Returns:* `false` if and only if `*this` is empty.
65
+
66
+ #### Query <a id="stacktrace.entry.query">[[stacktrace.entry.query]]</a>
67
+
68
+ [*Note 1*: All the `stacktrace_entry` query functions treat errors
69
+ other than memory allocation errors as “no information available” and do
70
+ not throw in that case. — *end note*]
71
+
72
+ ``` cpp
73
+ string description() const;
74
+ ```
75
+
76
+ *Returns:* A description of the evaluation represented by `*this`, or an
77
+ empty string.
78
+
79
+ *Throws:* `bad_alloc` if memory for the internal data structures or the
80
+ resulting string cannot be allocated.
81
+
82
+ ``` cpp
83
+ string source_file() const;
84
+ ```
85
+
86
+ *Returns:* The presumed or actual name of the source
87
+ file [[cpp.predefined]] that lexically contains the expression or
88
+ statement whose evaluation is represented by `*this`, or an empty
89
+ string.
90
+
91
+ *Throws:* `bad_alloc` if memory for the internal data structures or the
92
+ resulting string cannot be allocated.
93
+
94
+ ``` cpp
95
+ uint_least32_t source_line() const;
96
+ ```
97
+
98
+ *Returns:* `0`, or a 1-based line number that lexically relates to the
99
+ evaluation represented by `*this`. If `source_file` returns the presumed
100
+ name of the source file, returns the presumed line number; if
101
+ `source_file` returns the actual name of the source file, returns the
102
+ actual line number.
103
+
104
+ *Throws:* `bad_alloc` if memory for the internal data structures cannot
105
+ be allocated.
106
+
107
+ #### Comparison <a id="stacktrace.entry.cmp">[[stacktrace.entry.cmp]]</a>
108
+
109
+ ``` cpp
110
+ friend constexpr bool operator==(const stacktrace_entry& x, const stacktrace_entry& y) noexcept;
111
+ ```
112
+
113
+ *Returns:* `true` if and only if `x` and `y` represent the same
114
+ stacktrace entry or both `x` and `y` are empty.
115
+