std::basic_stacktrace<Allocator>::current
From cppreference.com
 
 
 < cpp | utility | basic stacktrace 
 
 
 C++ 
 Feature test macros (C++20)
 Concepts library (C++20)
 Metaprogramming library (C++11)
 Ranges library (C++20)
 Filesystem library (C++17)
 Concurrency support library (C++11)
 Execution control library (C++26)
Diagnostics library 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
(until C++20*)
  (C++17)(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
 Exception handling failures
(C++11)
(until C++17*)
(until C++17*)
(until C++17*)
(until C++17*)
(TM TS)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++23)
(C++23)
(C++26)
(C++26)
(C++26)
std::basic_stacktrace 
 
basic_stacktrace::current
static basic_stacktrace current( const allocator_type& alloc =
allocator_type() ) noexcept;
 (1) 
 (since C++23) 
allocator_type() ) noexcept;
static basic_stacktrace current( size_type skip, const allocator_type& alloc =
allocator_type() ) noexcept;
 (2) 
 (since C++23) 
allocator_type() ) noexcept;
static basic_stacktrace current( size_type skip, size_type max_depth,
 (3) 
 (since C++23) 
                                 const allocator_type& alloc =
Let s[i] (0 ≤ i < n) denote the (i+1)-th stacktrace entry in the stacktrace of the current evaluation in the current thread of execution, where n is the count of the stacktrace entries in the stackentry.
1) Attempts to create a 
basic_stacktrace consisting of s[0], s[1], ..., s[n - 1].2) Attempts to create a 
basic_stacktrace consisting of s[m], s[m + 1], ..., s[n - 1], where m is min(skip, n).3) Attempts to create a 
basic_stacktrace consisting of s[m], s[m + 1], ..., s[o - 1], where m is min(skip, n) and o is min(skip + max_depth, n). The behavior is undefined if the skip + max_depth < skip (i.e. the mathematical result of skip + max_depth overflows).In all cases, alloc is stored into the created basic_stacktrace and used to allocate the storage for stacktrace entries.
Contents
[edit] Parameters
 alloc
 -
 allocator to use for all memory allocations of the constructed 
basic_stacktrace
 skip
 -
 the number of stacktrace entries to skip
 max_depth
 -
 the maximum depth of the stacktrace entries
[edit] Return value
If the allocation succeeds, the basic_stacktrace described above.
Otherwise, an empty basic_stacktrace.
[edit] Example
 This section is incomplete
Reason: no example
Reason: no example