From Jason Turner

[stacktrace.basic]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp5hvpy2kh/{from.md → to.md} +24 -147
tmp/tmp5hvpy2kh/{from.md → to.md} RENAMED
@@ -50,11 +50,11 @@ namespace std {
50
  const_iterator cbegin() const noexcept;
51
  const_iterator cend() const noexcept;
52
  const_reverse_iterator crbegin() const noexcept;
53
  const_reverse_iterator crend() const noexcept;
54
 
55
- [[nodiscard]] bool empty() const noexcept;
56
  size_type size() const noexcept;
57
  size_type max_size() const noexcept;
58
 
59
  const_reference operator[](size_type) const;
60
  const_reference at(size_type) const;
@@ -92,48 +92,49 @@ container [[container.alloc.reqmts]], and of a sequence container
92
 
93
  ``` cpp
94
  static basic_stacktrace current(const allocator_type& alloc = allocator_type()) noexcept;
95
  ```
96
 
97
- *Returns:* A `basic_stacktrace` object with `frames_` storing the
98
  stacktrace of the current evaluation in the current thread of execution,
99
- or an empty `basic_stacktrace` object if the initialization of `frames_`
100
- failed. `alloc` is passed to the constructor of the `frames_` object.
 
101
 
102
  [*Note 1*: If the stacktrace was successfully obtained, then
103
- `frames_.front()` is the `stacktrace_entry` representing approximately
104
- the current evaluation, and `frames_.back()` is the `stacktrace_entry`
105
- representing approximately the initial function of the current thread of
106
- execution. — *end note*]
107
 
108
  ``` cpp
109
  static basic_stacktrace current(size_type skip,
110
  const allocator_type& alloc = allocator_type()) noexcept;
111
  ```
112
 
113
  Let `t` be a stacktrace as-if obtained via
114
  `basic_stacktrace::current(alloc)`. Let `n` be `t.size()`.
115
 
116
- *Returns:* A `basic_stacktrace` object where `frames_` is
117
  direct-non-list-initialized from arguments `t.begin() + min(n, skip)`,
118
  `t.end()`, and `alloc`, or an empty `basic_stacktrace` object if the
119
- initialization of `frames_` failed.
120
 
121
  ``` cpp
122
  static basic_stacktrace current(size_type skip, size_type max_depth,
123
  const allocator_type& alloc = allocator_type()) noexcept;
124
  ```
125
 
126
  Let `t` be a stacktrace as-if obtained via
127
  `basic_stacktrace::current(alloc)`. Let `n` be `t.size()`.
128
 
129
- *Preconditions:* `skip <= skip + max_depth` is `true`.
130
 
131
- *Returns:* A `basic_stacktrace` object where `frames_` is
132
  direct-non-list-initialized from arguments `t.begin() + min(n, skip)`,
133
  `t.begin() + min(n, skip + max_depth)`, and `alloc`, or an empty
134
- `basic_stacktrace` object if the initialization of `frames_` failed.
135
 
136
  ``` cpp
137
  basic_stacktrace() noexcept(is_nothrow_default_constructible_v<allocator_type>);
138
  ```
139
 
@@ -141,11 +142,11 @@ basic_stacktrace() noexcept(is_nothrow_default_constructible_v<allocator_type>);
141
 
142
  ``` cpp
143
  explicit basic_stacktrace(const allocator_type& alloc) noexcept;
144
  ```
145
 
146
- *Effects:* `alloc` is passed to the `frames_` constructor.
147
 
148
  *Ensures:* `empty()` is `true`.
149
 
150
  ``` cpp
151
  basic_stacktrace(const basic_stacktrace& other);
@@ -173,18 +174,18 @@ The type models `random_access_iterator`
173
 
174
  ``` cpp
175
  allocator_type get_allocator() const noexcept;
176
  ```
177
 
178
- *Returns:* `frames_.get_allocator()`.
179
 
180
  ``` cpp
181
  const_iterator begin() const noexcept;
182
  const_iterator cbegin() const noexcept;
183
  ```
184
 
185
- *Returns:* An iterator referring to the first element in `frames_`. If
186
  `empty()` is `true`, then it returns the same value as `end()`.
187
 
188
  ``` cpp
189
  const_iterator end() const noexcept;
190
  const_iterator cend() const noexcept;
@@ -205,42 +206,42 @@ const_reverse_iterator crend() const noexcept;
205
  ```
206
 
207
  *Returns:* `reverse_iterator(cbegin())`.
208
 
209
  ``` cpp
210
- [[nodiscard]] bool empty() const noexcept;
211
  ```
212
 
213
- *Returns:* `frames_.empty()`.
214
 
215
  ``` cpp
216
  size_type size() const noexcept;
217
  ```
218
 
219
- *Returns:* `frames_.size()`.
220
 
221
  ``` cpp
222
  size_type max_size() const noexcept;
223
  ```
224
 
225
- *Returns:* `frames_.max_size()`.
226
 
227
  ``` cpp
228
  const_reference operator[](size_type frame_no) const;
229
  ```
230
 
231
- *Preconditions:* `frame_no < size()` is `true`.
232
 
233
- *Returns:* `frames_[frame_no]`.
234
 
235
  *Throws:* Nothing.
236
 
237
  ``` cpp
238
  const_reference at(size_type frame_no) const;
239
  ```
240
 
241
- *Returns:* `frames_[frame_no]`.
242
 
243
  *Throws:* `out_of_range` if `frame_no >= size()`.
244
 
245
  #### Comparisons <a id="stacktrace.basic.cmp">[[stacktrace.basic.cmp]]</a>
246
 
@@ -312,129 +313,5 @@ template<class Allocator>
312
  ostream& operator<<(ostream& os, const basic_stacktrace<Allocator>& st);
313
  ```
314
 
315
  *Effects:* Equivalent to: `return os << to_string(st);`
316
 
317
- #### Formatting support <a id="stacktrace.format">[[stacktrace.format]]</a>
318
-
319
- ``` cpp
320
- template<> struct formatter<stacktrace_entry>;
321
- ```
322
-
323
- `formatter<stacktrace_entry>` interprets *format-spec* as a
324
- *stacktrace-entry-format-spec*. The syntax of format specifications is
325
- as follows:
326
-
327
- ``` bnf
328
- stacktrace-entry-format-spec
329
- fill-and-alignₒₚₜ widthₒₚₜ
330
- ```
331
-
332
- [*Note 1*: The productions *fill-and-align* and *width* are described
333
- in [[format.string.std]]. — *end note*]
334
-
335
- A `stacktrace_entry` object `se` is formatted as if by copying
336
- `to_string(se)` through the output iterator of the context with
337
- additional padding and adjustments as specified by the format
338
- specifiers.
339
-
340
- ``` cpp
341
- template<class Allocator> struct formatter<basic_stacktrace<Allocator>>;
342
- ```
343
-
344
- For `formatter<basic_stacktrace<Allocator>>`, *format-spec* is empty.
345
-
346
- A `basic_stacktrace<Allocator>` object `s` is formatted as if by copying
347
- `to_string(s)` through the output iterator of the context.
348
-
349
- #### Hash support <a id="stacktrace.basic.hash">[[stacktrace.basic.hash]]</a>
350
-
351
- ``` cpp
352
- template<> struct hash<stacktrace_entry>;
353
- template<class Allocator> struct hash<basic_stacktrace<Allocator>>;
354
- ```
355
-
356
- The specializations are enabled [[unord.hash]].
357
-
358
- <!-- Link reference definitions -->
359
- [assertions]: #assertions
360
- [assertions.assert]: #assertions.assert
361
- [assertions.general]: #assertions.general
362
- [bad.alloc]: support.md#bad.alloc
363
- [cassert.syn]: #cassert.syn
364
- [cerrno.syn]: #cerrno.syn
365
- [cmp.concept]: support.md#cmp.concept
366
- [comparisons.three.way]: utilities.md#comparisons.three.way
367
- [concepts.object]: concepts.md#concepts.object
368
- [container.alloc.reqmts]: containers.md#container.alloc.reqmts
369
- [container.rev.reqmts]: containers.md#container.rev.reqmts
370
- [conv]: expr.md#conv
371
- [cpp.predefined]: cpp.md#cpp.predefined
372
- [defns.const.subexpr]: intro.md#defns.const.subexpr
373
- [diagnostics]: #diagnostics
374
- [diagnostics.general]: #diagnostics.general
375
- [diagnostics.summary]: #diagnostics.summary
376
- [domain.error]: #domain.error
377
- [errno]: #errno
378
- [errno.general]: #errno.general
379
- [format.string.std]: utilities.md#format.string.std
380
- [intro.execution]: basic.md#intro.execution
381
- [invalid.argument]: #invalid.argument
382
- [iterator.concept.random.access]: iterators.md#iterator.concept.random.access
383
- [length.error]: #length.error
384
- [logic.error]: #logic.error
385
- [out.of.range]: #out.of.range
386
- [overflow.error]: #overflow.error
387
- [random.access.iterators]: iterators.md#random.access.iterators
388
- [range.error]: #range.error
389
- [res.on.exception.handling]: library.md#res.on.exception.handling
390
- [runtime.error]: #runtime.error
391
- [sequence.reqmts]: containers.md#sequence.reqmts
392
- [stacktrace]: #stacktrace
393
- [stacktrace.basic]: #stacktrace.basic
394
- [stacktrace.basic.cmp]: #stacktrace.basic.cmp
395
- [stacktrace.basic.cons]: #stacktrace.basic.cons
396
- [stacktrace.basic.hash]: #stacktrace.basic.hash
397
- [stacktrace.basic.mod]: #stacktrace.basic.mod
398
- [stacktrace.basic.nonmem]: #stacktrace.basic.nonmem
399
- [stacktrace.basic.obs]: #stacktrace.basic.obs
400
- [stacktrace.basic.overview]: #stacktrace.basic.overview
401
- [stacktrace.entry]: #stacktrace.entry
402
- [stacktrace.entry.cmp]: #stacktrace.entry.cmp
403
- [stacktrace.entry.cons]: #stacktrace.entry.cons
404
- [stacktrace.entry.obs]: #stacktrace.entry.obs
405
- [stacktrace.entry.overview]: #stacktrace.entry.overview
406
- [stacktrace.entry.query]: #stacktrace.entry.query
407
- [stacktrace.format]: #stacktrace.format
408
- [stacktrace.general]: #stacktrace.general
409
- [stacktrace.syn]: #stacktrace.syn
410
- [std.exceptions]: #std.exceptions
411
- [std.exceptions.general]: #std.exceptions.general
412
- [stdexcept.syn]: #stdexcept.syn
413
- [syserr]: #syserr
414
- [syserr.compare]: #syserr.compare
415
- [syserr.errcat]: #syserr.errcat
416
- [syserr.errcat.derived]: #syserr.errcat.derived
417
- [syserr.errcat.nonvirtuals]: #syserr.errcat.nonvirtuals
418
- [syserr.errcat.objects]: #syserr.errcat.objects
419
- [syserr.errcat.overview]: #syserr.errcat.overview
420
- [syserr.errcat.virtuals]: #syserr.errcat.virtuals
421
- [syserr.errcode]: #syserr.errcode
422
- [syserr.errcode.constructors]: #syserr.errcode.constructors
423
- [syserr.errcode.modifiers]: #syserr.errcode.modifiers
424
- [syserr.errcode.nonmembers]: #syserr.errcode.nonmembers
425
- [syserr.errcode.observers]: #syserr.errcode.observers
426
- [syserr.errcode.overview]: #syserr.errcode.overview
427
- [syserr.errcondition]: #syserr.errcondition
428
- [syserr.errcondition.constructors]: #syserr.errcondition.constructors
429
- [syserr.errcondition.modifiers]: #syserr.errcondition.modifiers
430
- [syserr.errcondition.nonmembers]: #syserr.errcondition.nonmembers
431
- [syserr.errcondition.observers]: #syserr.errcondition.observers
432
- [syserr.errcondition.overview]: #syserr.errcondition.overview
433
- [syserr.general]: #syserr.general
434
- [syserr.hash]: #syserr.hash
435
- [syserr.syserr]: #syserr.syserr
436
- [syserr.syserr.members]: #syserr.syserr.members
437
- [syserr.syserr.overview]: #syserr.syserr.overview
438
- [system.error.syn]: #system.error.syn
439
- [underflow.error]: #underflow.error
440
- [unord.hash]: utilities.md#unord.hash
 
50
  const_iterator cbegin() const noexcept;
51
  const_iterator cend() const noexcept;
52
  const_reverse_iterator crbegin() const noexcept;
53
  const_reverse_iterator crend() const noexcept;
54
 
55
+ bool empty() const noexcept;
56
  size_type size() const noexcept;
57
  size_type max_size() const noexcept;
58
 
59
  const_reference operator[](size_type) const;
60
  const_reference at(size_type) const;
 
92
 
93
  ``` cpp
94
  static basic_stacktrace current(const allocator_type& alloc = allocator_type()) noexcept;
95
  ```
96
 
97
+ *Returns:* A `basic_stacktrace` object with *frames\_* storing the
98
  stacktrace of the current evaluation in the current thread of execution,
99
+ or an empty `basic_stacktrace` object if the initialization of
100
+ *frames\_* failed. `alloc` is passed to the constructor of the
101
+ *frames\_* object.
102
 
103
  [*Note 1*: If the stacktrace was successfully obtained, then
104
+ *`frames_`*`.front()` is the `stacktrace_entry` representing
105
+ approximately the current evaluation, and *`frames_`*`.back()` is the
106
+ `stacktrace_entry` representing approximately the initial function of
107
+ the current thread of execution. — *end note*]
108
 
109
  ``` cpp
110
  static basic_stacktrace current(size_type skip,
111
  const allocator_type& alloc = allocator_type()) noexcept;
112
  ```
113
 
114
  Let `t` be a stacktrace as-if obtained via
115
  `basic_stacktrace::current(alloc)`. Let `n` be `t.size()`.
116
 
117
+ *Returns:* A `basic_stacktrace` object where *frames\_* is
118
  direct-non-list-initialized from arguments `t.begin() + min(n, skip)`,
119
  `t.end()`, and `alloc`, or an empty `basic_stacktrace` object if the
120
+ initialization of *frames\_* failed.
121
 
122
  ``` cpp
123
  static basic_stacktrace current(size_type skip, size_type max_depth,
124
  const allocator_type& alloc = allocator_type()) noexcept;
125
  ```
126
 
127
  Let `t` be a stacktrace as-if obtained via
128
  `basic_stacktrace::current(alloc)`. Let `n` be `t.size()`.
129
 
130
+ `skip <= skip + max_depth` is `true`.
131
 
132
+ *Returns:* A `basic_stacktrace` object where *frames\_* is
133
  direct-non-list-initialized from arguments `t.begin() + min(n, skip)`,
134
  `t.begin() + min(n, skip + max_depth)`, and `alloc`, or an empty
135
+ `basic_stacktrace` object if the initialization of *frames\_* failed.
136
 
137
  ``` cpp
138
  basic_stacktrace() noexcept(is_nothrow_default_constructible_v<allocator_type>);
139
  ```
140
 
 
142
 
143
  ``` cpp
144
  explicit basic_stacktrace(const allocator_type& alloc) noexcept;
145
  ```
146
 
147
+ *Effects:* `alloc` is passed to the *frames\_* constructor.
148
 
149
  *Ensures:* `empty()` is `true`.
150
 
151
  ``` cpp
152
  basic_stacktrace(const basic_stacktrace& other);
 
174
 
175
  ``` cpp
176
  allocator_type get_allocator() const noexcept;
177
  ```
178
 
179
+ *Returns:* *`frames_`*`.get_allocator()`.
180
 
181
  ``` cpp
182
  const_iterator begin() const noexcept;
183
  const_iterator cbegin() const noexcept;
184
  ```
185
 
186
+ *Returns:* An iterator referring to the first element in *frames\_*. If
187
  `empty()` is `true`, then it returns the same value as `end()`.
188
 
189
  ``` cpp
190
  const_iterator end() const noexcept;
191
  const_iterator cend() const noexcept;
 
206
  ```
207
 
208
  *Returns:* `reverse_iterator(cbegin())`.
209
 
210
  ``` cpp
211
+ bool empty() const noexcept;
212
  ```
213
 
214
+ *Returns:* *`frames_`*`.empty()`.
215
 
216
  ``` cpp
217
  size_type size() const noexcept;
218
  ```
219
 
220
+ *Returns:* *`frames_`*`.size()`.
221
 
222
  ``` cpp
223
  size_type max_size() const noexcept;
224
  ```
225
 
226
+ *Returns:* *`frames_`*`.max_size()`.
227
 
228
  ``` cpp
229
  const_reference operator[](size_type frame_no) const;
230
  ```
231
 
232
+ `frame_no < size()` is `true`.
233
 
234
+ *Returns:* *`frames_`*`[frame_no]`.
235
 
236
  *Throws:* Nothing.
237
 
238
  ``` cpp
239
  const_reference at(size_type frame_no) const;
240
  ```
241
 
242
+ *Returns:* *`frames_`*`[frame_no]`.
243
 
244
  *Throws:* `out_of_range` if `frame_no >= size()`.
245
 
246
  #### Comparisons <a id="stacktrace.basic.cmp">[[stacktrace.basic.cmp]]</a>
247
 
 
313
  ostream& operator<<(ostream& os, const basic_stacktrace<Allocator>& st);
314
  ```
315
 
316
  *Effects:* Equivalent to: `return os << to_string(st);`
317