From Jason Turner

[stacktrace.basic.cons]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpvf9zbh4b/{from.md → to.md} +73 -0
tmp/tmpvf9zbh4b/{from.md → to.md} RENAMED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### Creation and assignment <a id="stacktrace.basic.cons">[[stacktrace.basic.cons]]</a>
2
+
3
+ ``` cpp
4
+ static basic_stacktrace current(const allocator_type& alloc = allocator_type()) noexcept;
5
+ ```
6
+
7
+ *Returns:* A `basic_stacktrace` object with `frames_` storing the
8
+ stacktrace of the current evaluation in the current thread of execution,
9
+ or an empty `basic_stacktrace` object if the initialization of `frames_`
10
+ failed. `alloc` is passed to the constructor of the `frames_` object.
11
+
12
+ [*Note 1*: If the stacktrace was successfully obtained, then
13
+ `frames_.front()` is the `stacktrace_entry` representing approximately
14
+ the current evaluation, and `frames_.back()` is the `stacktrace_entry`
15
+ representing approximately the initial function of the current thread of
16
+ execution. — *end note*]
17
+
18
+ ``` cpp
19
+ static basic_stacktrace current(size_type skip,
20
+ const allocator_type& alloc = allocator_type()) noexcept;
21
+ ```
22
+
23
+ Let `t` be a stacktrace as-if obtained via
24
+ `basic_stacktrace::current(alloc)`. Let `n` be `t.size()`.
25
+
26
+ *Returns:* A `basic_stacktrace` object where `frames_` is
27
+ direct-non-list-initialized from arguments `t.begin() + min(n, skip)`,
28
+ `t.end()`, and `alloc`, or an empty `basic_stacktrace` object if the
29
+ initialization of `frames_` failed.
30
+
31
+ ``` cpp
32
+ static basic_stacktrace current(size_type skip, size_type max_depth,
33
+ const allocator_type& alloc = allocator_type()) noexcept;
34
+ ```
35
+
36
+ Let `t` be a stacktrace as-if obtained via
37
+ `basic_stacktrace::current(alloc)`. Let `n` be `t.size()`.
38
+
39
+ *Preconditions:* `skip <= skip + max_depth` is `true`.
40
+
41
+ *Returns:* A `basic_stacktrace` object where `frames_` is
42
+ direct-non-list-initialized from arguments `t.begin() + min(n, skip)`,
43
+ `t.begin() + min(n, skip + max_depth)`, and `alloc`, or an empty
44
+ `basic_stacktrace` object if the initialization of `frames_` failed.
45
+
46
+ ``` cpp
47
+ basic_stacktrace() noexcept(is_nothrow_default_constructible_v<allocator_type>);
48
+ ```
49
+
50
+ *Ensures:* `empty()` is `true`.
51
+
52
+ ``` cpp
53
+ explicit basic_stacktrace(const allocator_type& alloc) noexcept;
54
+ ```
55
+
56
+ *Effects:* `alloc` is passed to the `frames_` constructor.
57
+
58
+ *Ensures:* `empty()` is `true`.
59
+
60
+ ``` cpp
61
+ basic_stacktrace(const basic_stacktrace& other);
62
+ basic_stacktrace(const basic_stacktrace& other, const allocator_type& alloc);
63
+ basic_stacktrace(basic_stacktrace&& other, const allocator_type& alloc);
64
+ basic_stacktrace& operator=(const basic_stacktrace& other);
65
+ basic_stacktrace& operator=(basic_stacktrace&& other)
66
+ noexcept(allocator_traits<Allocator>::propagate_on_container_move_assignment::value ||
67
+ allocator_traits<Allocator>::is_always_equal::value);
68
+ ```
69
+
70
+ *Remarks:* Implementations may strengthen the exception specification
71
+ for these functions [[res.on.exception.handling]] by ensuring that
72
+ `empty()` is `true` on failed allocation.
73
+