tmp/tmposn2cs7k/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Overview <a id="stacktrace.basic.overview">[[stacktrace.basic.overview]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
namespace std {
|
| 5 |
+
template<class Allocator>
|
| 6 |
+
class basic_stacktrace {
|
| 7 |
+
public:
|
| 8 |
+
using value_type = stacktrace_entry;
|
| 9 |
+
using const_reference = const value_type&;
|
| 10 |
+
using reference = value_type&;
|
| 11 |
+
using const_iterator = implementation-defined // type of basic_stacktrace::const_iterator; // see [stacktrace.basic.obs]
|
| 12 |
+
using iterator = const_iterator;
|
| 13 |
+
using reverse_iterator = std::reverse_iterator<iterator>;
|
| 14 |
+
using const_reverse_iterator = std::reverse_iterator<const_iterator>;
|
| 15 |
+
using difference_type = implementation-defined // type of basic_stacktrace::difference_type;
|
| 16 |
+
using size_type = implementation-defined // type of basic_stacktrace::size_type;
|
| 17 |
+
using allocator_type = Allocator;
|
| 18 |
+
|
| 19 |
+
// [stacktrace.basic.cons], creation and assignment
|
| 20 |
+
static basic_stacktrace current(const allocator_type& alloc = allocator_type()) noexcept;
|
| 21 |
+
static basic_stacktrace current(size_type skip,
|
| 22 |
+
const allocator_type& alloc = allocator_type()) noexcept;
|
| 23 |
+
static basic_stacktrace current(size_type skip, size_type max_depth,
|
| 24 |
+
const allocator_type& alloc = allocator_type()) noexcept;
|
| 25 |
+
|
| 26 |
+
basic_stacktrace() noexcept(is_nothrow_default_constructible_v<allocator_type>);
|
| 27 |
+
explicit basic_stacktrace(const allocator_type& alloc) noexcept;
|
| 28 |
+
|
| 29 |
+
basic_stacktrace(const basic_stacktrace& other);
|
| 30 |
+
basic_stacktrace(basic_stacktrace&& other) noexcept;
|
| 31 |
+
basic_stacktrace(const basic_stacktrace& other, const allocator_type& alloc);
|
| 32 |
+
basic_stacktrace(basic_stacktrace&& other, const allocator_type& alloc);
|
| 33 |
+
basic_stacktrace& operator=(const basic_stacktrace& other);
|
| 34 |
+
basic_stacktrace& operator=(basic_stacktrace&& other)
|
| 35 |
+
noexcept(allocator_traits<Allocator>::propagate_on_container_move_assignment::value ||
|
| 36 |
+
allocator_traits<Allocator>::is_always_equal::value);
|
| 37 |
+
|
| 38 |
+
~basic_stacktrace();
|
| 39 |
+
|
| 40 |
+
// [stacktrace.basic.obs], observers
|
| 41 |
+
allocator_type get_allocator() const noexcept;
|
| 42 |
+
|
| 43 |
+
const_iterator begin() const noexcept;
|
| 44 |
+
const_iterator end() const noexcept;
|
| 45 |
+
const_reverse_iterator rbegin() const noexcept;
|
| 46 |
+
const_reverse_iterator rend() const noexcept;
|
| 47 |
+
|
| 48 |
+
const_iterator cbegin() const noexcept;
|
| 49 |
+
const_iterator cend() const noexcept;
|
| 50 |
+
const_reverse_iterator crbegin() const noexcept;
|
| 51 |
+
const_reverse_iterator crend() const noexcept;
|
| 52 |
+
|
| 53 |
+
[[nodiscard]] bool empty() const noexcept;
|
| 54 |
+
size_type size() const noexcept;
|
| 55 |
+
size_type max_size() const noexcept;
|
| 56 |
+
|
| 57 |
+
const_reference operator[](size_type) const;
|
| 58 |
+
const_reference at(size_type) const;
|
| 59 |
+
|
| 60 |
+
// [stacktrace.basic.cmp], comparisons
|
| 61 |
+
template<class Allocator2>
|
| 62 |
+
friend bool operator==(const basic_stacktrace& x,
|
| 63 |
+
const basic_stacktrace<Allocator2>& y) noexcept;
|
| 64 |
+
template<class Allocator2>
|
| 65 |
+
friend strong_ordering operator<=>(const basic_stacktrace& x,
|
| 66 |
+
const basic_stacktrace<Allocator2>& y) noexcept;
|
| 67 |
+
|
| 68 |
+
// [stacktrace.basic.mod], modifiers
|
| 69 |
+
void swap(basic_stacktrace& other)
|
| 70 |
+
noexcept(allocator_traits<Allocator>::propagate_on_container_swap::value ||
|
| 71 |
+
allocator_traits<Allocator>::is_always_equal::value);
|
| 72 |
+
|
| 73 |
+
private:
|
| 74 |
+
vector<value_type, allocator_type> frames_; // exposition only
|
| 75 |
+
};
|
| 76 |
+
}
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
+
The class template `basic_stacktrace` satisfies the requirements of a
|
| 80 |
+
reversible container [[container.rev.reqmts]], of an allocator-aware
|
| 81 |
+
container [[container.alloc.reqmts]], and of a sequence container
|
| 82 |
+
[[sequence.reqmts]], except that
|
| 83 |
+
|
| 84 |
+
- only move, assignment, swap, and operations defined for
|
| 85 |
+
const-qualified sequence containers are supported and,
|
| 86 |
+
- the semantics of comparison functions are different from those
|
| 87 |
+
required for a container.
|
| 88 |
+
|