std::basic_stacktrace
| <stacktrace> 에 정의되어 있음.
|
||
template< class Allocator > class basic_stacktrace; |
(1) | (since C++23) |
using stacktrace = std::basic_stacktrace<std::allocator<std::stacktrace_entry>>; |
(2) | (since C++23) |
namespace pmr { using stacktrace = std::basic_stacktrace<std::pmr::polymorphic_allocator<std::stacktrace_entry>>; } |
(3) | (since C++23) |
basic_stacktrace class template represents a snapshot of the whole stacktrace or its given part. It satisfies the requirement of AllocatorAwareContainer, SequenceContainer, and ReversibleContainer, except that only move, assignment, swap, and operations for const-qualified sequence containers are supported, and the semantics of comparison functions are different from those required for a container.basic_stacktrace using the default std::allocator.The invocation sequence of the current evaluation x0 in the current thread of execution is a sequence (x0, ..., xn) of evaluations such that, for i≥0, xi is within the function invocation xi+1.
A stacktrace is an approximate representation of an invocation sequence and consists of stacktrace entries.
A stacktrace entry represents an evaluation in a stacktrace. It is represented by std::stacktrace_entry in the C++ standard library.
Template parameters
| Allocator | - | An allocator that is used to acquire/release memory and to construct/destroy the elements in that memory. The type must meet the requirements of Allocator. The program is ill-formed if Allocator::value_type is not std::stacktrace_entry.
|
Member types
| Member type | Definition |
value_type(C++23)
|
std::stacktrace_entry |
const_reference(C++23)
|
const value_type&
|
reference(C++23)
|
value_type&
|
const_iterator(C++23)
|
implementation-defined const LegacyRandomAccessIterator type that models random_access_iterator
|
iterator(C++23)
|
const_iterator
|
reverse_iterator(C++23)
|
std::reverse_iterator<iterator>
|
reverse_const_iterator(C++23)
|
std::reverse_iterator<const_iterator>
|
difference_type(C++23)
|
implementation-defined signed integer type |
size_type(C++23)
|
implementation-defined unsigned integer type |
allocator_type(C++23)
|
Allocator
|
Member functions
(C++23) |
creates a new basic_stacktrace (public member function) |
(C++23) |
destroys the basic_stacktrace (public member function) |
(C++23) |
assigns to the basic_stacktrace (public member function) |
[static] (C++23) |
obtains the current stacktrace or its given part (public static member function) |
(C++23) |
returns the associated allocator (public member function) |
Iterators | |
(C++23) |
반복자의 시작점을 반환합니다 (public member function) |
(C++23) |
반복자의 끝점을 반환합니다 (public member function) |
(C++23) |
역반복자의 시작점을 반환합니다 (public member function) |
(C++23) |
역반복자의 끝점을 반환합니다 (public member function) |
Capacity | |
(C++23) |
basic_stacktrace 가 비어있는지 검사합니다 (public member function) |
(C++23) |
스택 추적 내용의 개수를 반환합니다 (public member function) |
(C++23) |
최대로 가능한 스택 추적 내용의 개수를 반환합니다 (public member function) |
Element access | |
(C++23) |
명시된 스택 추적 내용에 접근합니다 (public member function) |
(C++23) |
경계값 검사를 하면서 명시된 스택 추적 내용에 접근합니다 (public member function) |
Modifiers | |
(C++23) |
내용을 교환(swap) 합니다 (public member function) |
Non-member functions
(C++23) |
compares the sizes and the contents of two basic_stacktrace values (function template) |
| std::swap 알고리즘을 특수화합니다 (function template) | |
(C++23) |
basic_stacktrace 를 설명하는 문자열을 반환합니다 (function template) |
(C++23) |
basic_stracktrace의 스트림 출력을 수행합니다 (function template) |
Helper classes
| std::basic_stacktrace 를 위한 해시 지원 (class template specialization) |
Notes
Support for custom allocators is provided for using basic_stacktrace on a hot path or in embedded environments. Users can allocate stacktrace_entry objects on the stack or in some other place, where appropriate.
The sequence of std::stacktrace_entry objects owned by a std::basic_stacktrace is immutable, and either is empty or represents a contiguous interval of the whole stacktrace.
boost::stacktrace::basic_stacktrace (available in Boost.Stacktrace) can be used instead when std::basic_stacktrace is not available.
Example
| This section is incomplete Reason: no example |
See also
(C++23) |
스택추적 내용을 나타냅니다 (class) |