1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<html> 3<head> 4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 5<title>Class template basic_stacktrace</title> 6<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css"> 7<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 8<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> 9<link rel="up" href="../../stacktrace/reference.html#header.boost.stacktrace.stacktrace_hpp" title="Header <boost/stacktrace/stacktrace.hpp>"> 10<link rel="prev" href="../../stacktrace/reference.html" title="Reference"> 11<link rel="next" href="operator_1_3_37_7_3_1_1_3.html" title="Function template operator<"> 12</head> 13<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 14<table cellpadding="2" width="100%"><tr> 15<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td> 16<td align="center"><a href="../../../../index.html">Home</a></td> 17<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td> 18<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 19<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 20<td align="center"><a href="../../../../more/index.htm">More</a></td> 21</tr></table> 22<hr> 23<div class="spirit-nav"> 24<a accesskey="p" href="../../stacktrace/reference.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../stacktrace/reference.html#header.boost.stacktrace.stacktrace_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="operator_1_3_37_7_3_1_1_3.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 25</div> 26<div class="refentry"> 27<a name="boost.stacktrace.basic_stacktrace"></a><div class="titlepage"></div> 28<div class="refnamediv"> 29<h2><span class="refentrytitle">Class template basic_stacktrace</span></h2> 30<p>boost::stacktrace::basic_stacktrace</p> 31</div> 32<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2> 33<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: <<a class="link" href="../../stacktrace/reference.html#header.boost.stacktrace.stacktrace_hpp" title="Header <boost/stacktrace/stacktrace.hpp>">boost/stacktrace/stacktrace.hpp</a>> 34 35</span><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> Allocator<span class="special">></span> 36<span class="keyword">class</span> <a class="link" href="basic_stacktrace.html" title="Class template basic_stacktrace">basic_stacktrace</a> <span class="special">{</span> 37<span class="keyword">public</span><span class="special">:</span> 38 <span class="comment">// types</span> 39 <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span> <a class="link" href="frame.html" title="Class frame">boost::stacktrace::frame</a><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">></span><span class="special">::</span><span class="identifier">value_type</span> <a name="boost.stacktrace.basic_stacktrace.value_type"></a><span class="identifier">value_type</span><span class="special">;</span> 40 <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span> <a class="link" href="frame.html" title="Class frame">boost::stacktrace::frame</a><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">></span><span class="special">::</span><span class="identifier">allocator_type</span> <a name="boost.stacktrace.basic_stacktrace.allocator_type"></a><span class="identifier">allocator_type</span><span class="special">;</span> 41 <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span> <a class="link" href="frame.html" title="Class frame">boost::stacktrace::frame</a><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">></span><span class="special">::</span><span class="identifier">const_pointer</span> <a name="boost.stacktrace.basic_stacktrace.pointer"></a><span class="identifier">pointer</span><span class="special">;</span> 42 <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span> <a class="link" href="frame.html" title="Class frame">boost::stacktrace::frame</a><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">></span><span class="special">::</span><span class="identifier">const_pointer</span> <a name="boost.stacktrace.basic_stacktrace.const_pointer"></a><span class="identifier">const_pointer</span><span class="special">;</span> 43 <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span> <a class="link" href="frame.html" title="Class frame">boost::stacktrace::frame</a><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">></span><span class="special">::</span><span class="identifier">const_reference</span> <a name="boost.stacktrace.basic_stacktrace.reference"></a><span class="identifier">reference</span><span class="special">;</span> 44 <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span> <a class="link" href="frame.html" title="Class frame">boost::stacktrace::frame</a><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">></span><span class="special">::</span><span class="identifier">const_reference</span> <a name="boost.stacktrace.basic_stacktrace.const_reference"></a><span class="identifier">const_reference</span><span class="special">;</span> 45 <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span> <a class="link" href="frame.html" title="Class frame">boost::stacktrace::frame</a><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">></span><span class="special">::</span><span class="identifier">size_type</span> <a name="boost.stacktrace.basic_stacktrace.size_type"></a><span class="identifier">size_type</span><span class="special">;</span> 46 <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span> <a class="link" href="frame.html" title="Class frame">boost::stacktrace::frame</a><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">></span><span class="special">::</span><span class="identifier">difference_type</span> <a name="boost.stacktrace.basic_stacktrace.difference_type"></a><span class="identifier">difference_type</span><span class="special">;</span> 47 <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span> <a class="link" href="frame.html" title="Class frame">boost::stacktrace::frame</a><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">></span><span class="special">::</span><span class="identifier">const_iterator</span> <a name="boost.stacktrace.basic_stacktrace.iterator"></a><span class="identifier">iterator</span><span class="special">;</span> 48 <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span> <a class="link" href="frame.html" title="Class frame">boost::stacktrace::frame</a><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">></span><span class="special">::</span><span class="identifier">const_iterator</span> <a name="boost.stacktrace.basic_stacktrace.const_iterator"></a><span class="identifier">const_iterator</span><span class="special">;</span> 49 <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span> <a class="link" href="frame.html" title="Class frame">boost::stacktrace::frame</a><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">></span><span class="special">::</span><span class="identifier">const_reverse_iterator</span> <a name="boost.stacktrace.basic_stacktrace.reverse_iterator"></a><span class="identifier">reverse_iterator</span><span class="special">;</span> 50 <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span> <a class="link" href="frame.html" title="Class frame">boost::stacktrace::frame</a><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">></span><span class="special">::</span><span class="identifier">const_reverse_iterator</span> <a name="boost.stacktrace.basic_stacktrace.const_reverse_iterator"></a><span class="identifier">const_reverse_iterator</span><span class="special">;</span> 51 52 <span class="comment">// <a class="link" href="basic_stacktrace.html#boost.stacktrace.basic_stacktraceconstruct-copy-destruct">construct/copy/destruct</a></span> 53 <a class="link" href="basic_stacktrace.html#id-1_3_37_7_3_1_1_1_16-bb"><span class="identifier">basic_stacktrace</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span> 54 <span class="keyword">explicit</span> <a class="link" href="basic_stacktrace.html#id-1_3_37_7_3_1_1_1_17-bb"><span class="identifier">basic_stacktrace</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">allocator_type</span> <span class="special">&</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span> 55 <a class="link" href="basic_stacktrace.html#id-1_3_37_7_3_1_1_1_18-bb"><span class="identifier">basic_stacktrace</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> 56 <span class="keyword">const</span> <span class="identifier">allocator_type</span> <span class="special">&</span> <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span> 57 <a class="link" href="basic_stacktrace.html#id-1_3_37_7_3_1_1_1_19-bb"><span class="identifier">basic_stacktrace</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="basic_stacktrace.html" title="Class template basic_stacktrace">basic_stacktrace</a> <span class="special">&</span><span class="special">)</span><span class="special">;</span> 58 <a class="link" href="basic_stacktrace.html#id-1_3_37_7_3_1_1_1_22-bb"><span class="identifier">basic_stacktrace</span></a><span class="special">(</span><a class="link" href="basic_stacktrace.html" title="Class template basic_stacktrace">basic_stacktrace</a> <span class="special">&&</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span> 59 <a class="link" href="basic_stacktrace.html" title="Class template basic_stacktrace">basic_stacktrace</a> <span class="special">&</span> <a class="link" href="basic_stacktrace.html#id-1_3_37_7_3_1_1_1_20-bb"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="basic_stacktrace.html" title="Class template basic_stacktrace">basic_stacktrace</a> <span class="special">&</span><span class="special">)</span><span class="special">;</span> 60 <a class="link" href="basic_stacktrace.html" title="Class template basic_stacktrace">basic_stacktrace</a> <span class="special">&</span> <a class="link" href="basic_stacktrace.html#id-1_3_37_7_3_1_1_1_23-bb"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><a class="link" href="basic_stacktrace.html" title="Class template basic_stacktrace">basic_stacktrace</a> <span class="special">&&</span><span class="special">)</span><span class="special">;</span> 61 <a class="link" href="basic_stacktrace.html#id-1_3_37_7_3_1_1_1_21-bb"><span class="special">~</span><span class="identifier">basic_stacktrace</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span> 62 63 <span class="comment">// <a class="link" href="basic_stacktrace.html#id-1_3_37_7_3_1_1_1_15-bb">public member functions</a></span> 64 <span class="identifier">size_type</span> <a class="link" href="basic_stacktrace.html#id-1_3_37_7_3_1_1_1_15_1-bb"><span class="identifier">size</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span> 65 <span class="identifier">const_reference</span> <a class="link" href="basic_stacktrace.html#id-1_3_37_7_3_1_1_1_15_2-bb"><span class="keyword">operator</span><span class="special">[</span><span class="special">]</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span> 66 <span class="identifier">const_iterator</span> <a class="link" href="basic_stacktrace.html#id-1_3_37_7_3_1_1_1_15_3-bb"><span class="identifier">begin</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span> 67 <span class="identifier">const_iterator</span> <a class="link" href="basic_stacktrace.html#id-1_3_37_7_3_1_1_1_15_4-bb"><span class="identifier">cbegin</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span> 68 <span class="identifier">const_iterator</span> <a class="link" href="basic_stacktrace.html#id-1_3_37_7_3_1_1_1_15_5-bb"><span class="identifier">end</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span> 69 <span class="identifier">const_iterator</span> <a class="link" href="basic_stacktrace.html#id-1_3_37_7_3_1_1_1_15_6-bb"><span class="identifier">cend</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span> 70 <span class="identifier">const_reverse_iterator</span> <a class="link" href="basic_stacktrace.html#id-1_3_37_7_3_1_1_1_15_7-bb"><span class="identifier">rbegin</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span> 71 <span class="identifier">const_reverse_iterator</span> <a class="link" href="basic_stacktrace.html#id-1_3_37_7_3_1_1_1_15_8-bb"><span class="identifier">crbegin</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span> 72 <span class="identifier">const_reverse_iterator</span> <a class="link" href="basic_stacktrace.html#id-1_3_37_7_3_1_1_1_15_9-bb"><span class="identifier">rend</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span> 73 <span class="identifier">const_reverse_iterator</span> <a class="link" href="basic_stacktrace.html#id-1_3_37_7_3_1_1_1_15_10-bb"><span class="identifier">crend</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span> 74 <span class="keyword">explicit</span> <a class="link" href="basic_stacktrace.html#id-1_3_37_7_3_1_1_1_15_11-bb"><span class="keyword">operator</span> <span class="keyword">bool</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span> 75 <span class="keyword">bool</span> <a class="link" href="basic_stacktrace.html#id-1_3_37_7_3_1_1_1_15_12-bb"><span class="identifier">empty</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span> 76 <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span> <a class="link" href="frame.html" title="Class frame">boost::stacktrace::frame</a><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">></span> <span class="special">&</span> 77 <a class="link" href="basic_stacktrace.html#id-1_3_37_7_3_1_1_1_15_13-bb"><span class="identifier">as_vector</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span> 78 79 <span class="comment">// <a class="link" href="basic_stacktrace.html#id-1_3_37_7_3_1_1_1_24-bb">public static functions</a></span> 80 <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> Char<span class="special">,</span> <span class="keyword">typename</span> Trait<span class="special">></span> 81 <span class="keyword">static</span> <a class="link" href="basic_stacktrace.html" title="Class template basic_stacktrace">basic_stacktrace</a> 82 <a class="link" href="basic_stacktrace.html#id-1_3_37_7_3_1_1_1_24_1-bb"><span class="identifier">from_dump</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_istream</span><span class="special"><</span> <span class="identifier">Char</span><span class="special">,</span> <span class="identifier">Trait</span> <span class="special">></span> <span class="special">&</span><span class="special">,</span> 83 <span class="keyword">const</span> <span class="identifier">allocator_type</span> <span class="special">&</span> <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span> 84 <span class="keyword">static</span> <a class="link" href="basic_stacktrace.html" title="Class template basic_stacktrace">basic_stacktrace</a> 85 <a class="link" href="basic_stacktrace.html#id-1_3_37_7_3_1_1_1_24_2-bb"><span class="identifier">from_dump</span></a><span class="special">(</span><span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> 86 <span class="keyword">const</span> <span class="identifier">allocator_type</span> <span class="special">&</span> <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span> 87<span class="special">}</span><span class="special">;</span></pre></div> 88<div class="refsect1"> 89<a name="id-1.3.37.7.2.3.4"></a><h2>Description</h2> 90<p>Class that on construction copies minimal information about call stack into its internals and provides access to that information. 91</p> 92<div class="refsect2"> 93<a name="id-1.3.37.7.2.3.4.3"></a><h3>Template Parameters</h3> 94<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"> 95<pre class="literallayout"><span class="keyword">typename</span> Allocator</pre> 96<p>Allocator to use during stack capture. </p> 97</li></ol></div> 98</div> 99<div class="refsect2"> 100<a name="id-1.3.37.7.2.3.4.4"></a><h3> 101<a name="boost.stacktrace.basic_stacktraceconstruct-copy-destruct"></a><code class="computeroutput">basic_stacktrace</code> 102 public 103 construct/copy/destruct</h3> 104<div class="orderedlist"><ol class="orderedlist" type="1"> 105<li class="listitem"> 106<pre class="literallayout"><a name="id-1_3_37_7_3_1_1_1_16-bb"></a><span class="identifier">basic_stacktrace</span><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>Stores the current function call sequence inside *this without any decoding or any other heavy platform specific operations. <p><span class="bold"><strong>Complexity:</strong></span> O(N) where N is call sequence length, O(1) if BOOST_STACKTRACE_USE_NOOP is defined.</p> 107<p><span class="bold"><strong>Async-Handler-Safety</strong></span>: Safe if Allocator construction, copying, Allocator::allocate and Allocator::deallocate are async signal safe. </p> 108</li> 109<li class="listitem"> 110<pre class="literallayout"><span class="keyword">explicit</span> <a name="id-1_3_37_7_3_1_1_1_17-bb"></a><span class="identifier">basic_stacktrace</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">allocator_type</span> <span class="special">&</span> a<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>Stores the current function call sequence inside *this without any decoding or any other heavy platform specific operations. <p><span class="bold"><strong>Complexity:</strong></span> O(N) where N is call sequence length, O(1) if BOOST_STACKTRACE_USE_NOOP is defined.</p> 111<p><span class="bold"><strong>Async-Handler-Safety</strong></span>: Safe if Allocator construction, copying, Allocator::allocate and Allocator::deallocate are async signal safe.</p> 112<p> 113</p> 114<div class="variablelist"><table border="0" class="variablelist compact"> 115<colgroup> 116<col align="left" valign="top"> 117<col> 118</colgroup> 119<tbody><tr> 120<td><p><span class="term">Parameters:</span></p></td> 121<td><div class="variablelist"><table border="0" class="variablelist compact"> 122<colgroup> 123<col align="left" valign="top"> 124<col> 125</colgroup> 126<tbody><tr> 127<td><p><span class="term"><code class="computeroutput">a</code></span></p></td> 128<td><p>Allocator that would be passed to underlying storeage. </p></td> 129</tr></tbody> 130</table></div></td> 131</tr></tbody> 132</table></div> 133</li> 134<li class="listitem"> 135<pre class="literallayout"><a name="id-1_3_37_7_3_1_1_1_18-bb"></a><span class="identifier">basic_stacktrace</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> skip<span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> max_depth<span class="special">,</span> 136 <span class="keyword">const</span> <span class="identifier">allocator_type</span> <span class="special">&</span> a <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>Stores [skip, skip + max_depth) of the current function call sequence inside *this without any decoding or any other heavy platform specific operations. <p><span class="bold"><strong>Complexity:</strong></span> O(N) where N is call sequence length, O(1) if BOOST_STACKTRACE_USE_NOOP is defined.</p> 137<p><span class="bold"><strong>Async-Handler-Safety</strong></span>: Safe if Allocator construction, copying, Allocator::allocate and Allocator::deallocate are async signal safe.</p> 138<p> 139 140</p> 141<div class="variablelist"><table border="0" class="variablelist compact"> 142<colgroup> 143<col align="left" valign="top"> 144<col> 145</colgroup> 146<tbody> 147<tr> 148<td><p><span class="term">Parameters:</span></p></td> 149<td><div class="variablelist"><table border="0" class="variablelist compact"> 150<colgroup> 151<col align="left" valign="top"> 152<col> 153</colgroup> 154<tbody> 155<tr> 156<td><p><span class="term"><code class="computeroutput">a</code></span></p></td> 157<td><p>Allocator that would be passed to underlying storeage.</p></td> 158</tr> 159<tr> 160<td><p><span class="term"><code class="computeroutput">max_depth</code></span></p></td> 161<td><p>Max call sequence depth to collect.</p></td> 162</tr> 163<tr> 164<td><p><span class="term"><code class="computeroutput">skip</code></span></p></td> 165<td><p>How many top calls to skip and do not store in *this.</p></td> 166</tr> 167</tbody> 168</table></div></td> 169</tr> 170<tr> 171<td><p><span class="term">Throws:</span></p></td> 172<td>Nothing. Note that default construction of allocator may throw, however it is performed outside the constructor and exception in <code class="computeroutput">allocator_type()</code> would not result in calling <code class="computeroutput">std::terminate</code>. </td> 173</tr> 174</tbody> 175</table></div> 176</li> 177<li class="listitem"> 178<pre class="literallayout"><a name="id-1_3_37_7_3_1_1_1_19-bb"></a><span class="identifier">basic_stacktrace</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="basic_stacktrace.html" title="Class template basic_stacktrace">basic_stacktrace</a> <span class="special">&</span> st<span class="special">)</span><span class="special">;</span></pre> 179<p><span class="bold"><strong>Complexity:</strong></span> O(st.size())</p> 180<p><span class="bold"><strong>Async-Handler-Safety</strong></span>: Safe if Allocator construction, copying, Allocator::allocate and Allocator::deallocate are async signal safe. </p> 181</li> 182<li class="listitem"> 183<pre class="literallayout"><a name="id-1_3_37_7_3_1_1_1_22-bb"></a><span class="identifier">basic_stacktrace</span><span class="special">(</span><a class="link" href="basic_stacktrace.html" title="Class template basic_stacktrace">basic_stacktrace</a> <span class="special">&&</span> st<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre> 184<p><span class="bold"><strong>Complexity:</strong></span> O(1)</p> 185<p><span class="bold"><strong>Async-Handler-Safety</strong></span>: Safe if Allocator construction and copying are async signal safe. </p> 186</li> 187<li class="listitem"> 188<pre class="literallayout"><a class="link" href="basic_stacktrace.html" title="Class template basic_stacktrace">basic_stacktrace</a> <span class="special">&</span> <a name="id-1_3_37_7_3_1_1_1_20-bb"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="basic_stacktrace.html" title="Class template basic_stacktrace">basic_stacktrace</a> <span class="special">&</span> st<span class="special">)</span><span class="special">;</span></pre> 189<p><span class="bold"><strong>Complexity:</strong></span> O(st.size())</p> 190<p><span class="bold"><strong>Async-Handler-Safety</strong></span>: Safe if Allocator construction, copying, Allocator::allocate and Allocator::deallocate are async signal safe. </p> 191</li> 192<li class="listitem"> 193<pre class="literallayout"><a class="link" href="basic_stacktrace.html" title="Class template basic_stacktrace">basic_stacktrace</a> <span class="special">&</span> <a name="id-1_3_37_7_3_1_1_1_23-bb"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><a class="link" href="basic_stacktrace.html" title="Class template basic_stacktrace">basic_stacktrace</a> <span class="special">&&</span> st<span class="special">)</span><span class="special">;</span></pre> 194<p><span class="bold"><strong>Complexity:</strong></span> O(st.size())</p> 195<p><span class="bold"><strong>Async-Handler-Safety</strong></span>: Safe if Allocator construction and copying are async signal safe. </p> 196</li> 197<li class="listitem"> 198<pre class="literallayout"><a name="id-1_3_37_7_3_1_1_1_21-bb"></a><span class="special">~</span><span class="identifier">basic_stacktrace</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre> 199<p><span class="bold"><strong>Complexity:</strong></span> O(1)</p> 200<p><span class="bold"><strong>Async-Handler-Safety</strong></span>: Safe if Allocator::deallocate is async signal safe. </p> 201</li> 202</ol></div> 203</div> 204<div class="refsect2"> 205<a name="id-1.3.37.7.2.3.4.5"></a><h3> 206<a name="id-1_3_37_7_3_1_1_1_15-bb"></a><code class="computeroutput">basic_stacktrace</code> public member functions</h3> 207<div class="orderedlist"><ol class="orderedlist" type="1"> 208<li class="listitem"> 209<pre class="literallayout"><span class="identifier">size_type</span> <a name="id-1_3_37_7_3_1_1_1_15_1-bb"></a><span class="identifier">size</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre> 210<p> 211<span class="bold"><strong>Complexity:</strong></span> O(1)</p> 212<p><span class="bold"><strong>Async-Handler-Safety</strong></span>: Safe. </p> 213<div class="variablelist"><table border="0" class="variablelist compact"> 214<colgroup> 215<col align="left" valign="top"> 216<col> 217</colgroup> 218<tbody><tr> 219<td><p><span class="term">Returns:</span></p></td> 220<td><p>Number of function names stored inside the class.</p></td> 221</tr></tbody> 222</table></div> 223</li> 224<li class="listitem"> 225<pre class="literallayout"><span class="identifier">const_reference</span> <a name="id-1_3_37_7_3_1_1_1_15_2-bb"></a><span class="keyword">operator</span><span class="special">[</span><span class="special">]</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> frame_no<span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre> 226<p> 227 228<span class="bold"><strong>Complexity:</strong></span> O(1).</p> 229<p><span class="bold"><strong>Async-Handler-Safety</strong></span>: Safe. </p> 230<div class="variablelist"><table border="0" class="variablelist compact"> 231<colgroup> 232<col align="left" valign="top"> 233<col> 234</colgroup> 235<tbody> 236<tr> 237<td><p><span class="term">Parameters:</span></p></td> 238<td><div class="variablelist"><table border="0" class="variablelist compact"> 239<colgroup> 240<col align="left" valign="top"> 241<col> 242</colgroup> 243<tbody><tr> 244<td><p><span class="term"><code class="computeroutput">frame_no</code></span></p></td> 245<td><p>Zero based index of frame to return. 0 is the function index where stacktrace was constructed and index close to this->size() contains function <code class="computeroutput">main()</code>. </p></td> 246</tr></tbody> 247</table></div></td> 248</tr> 249<tr> 250<td><p><span class="term">Returns:</span></p></td> 251<td><p>frame that references the actual frame info, stored inside *this.</p></td> 252</tr> 253</tbody> 254</table></div> 255</li> 256<li class="listitem"> 257<pre class="literallayout"><span class="identifier">const_iterator</span> <a name="id-1_3_37_7_3_1_1_1_15_3-bb"></a><span class="identifier">begin</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre> 258<p><span class="bold"><strong>Complexity:</strong></span> O(1)</p> 259<p><span class="bold"><strong>Async-Handler-Safety</strong></span>: Safe. </p> 260</li> 261<li class="listitem"> 262<pre class="literallayout"><span class="identifier">const_iterator</span> <a name="id-1_3_37_7_3_1_1_1_15_4-bb"></a><span class="identifier">cbegin</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre> 263<p><span class="bold"><strong>Complexity:</strong></span> O(1)</p> 264<p><span class="bold"><strong>Async-Handler-Safety</strong></span>: Safe. </p> 265</li> 266<li class="listitem"> 267<pre class="literallayout"><span class="identifier">const_iterator</span> <a name="id-1_3_37_7_3_1_1_1_15_5-bb"></a><span class="identifier">end</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre> 268<p><span class="bold"><strong>Complexity:</strong></span> O(1)</p> 269<p><span class="bold"><strong>Async-Handler-Safety</strong></span>: Safe. </p> 270</li> 271<li class="listitem"> 272<pre class="literallayout"><span class="identifier">const_iterator</span> <a name="id-1_3_37_7_3_1_1_1_15_6-bb"></a><span class="identifier">cend</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre> 273<p><span class="bold"><strong>Complexity:</strong></span> O(1)</p> 274<p><span class="bold"><strong>Async-Handler-Safety</strong></span>: Safe. </p> 275</li> 276<li class="listitem"> 277<pre class="literallayout"><span class="identifier">const_reverse_iterator</span> <a name="id-1_3_37_7_3_1_1_1_15_7-bb"></a><span class="identifier">rbegin</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre> 278<p><span class="bold"><strong>Complexity:</strong></span> O(1)</p> 279<p><span class="bold"><strong>Async-Handler-Safety</strong></span>: Safe. </p> 280</li> 281<li class="listitem"> 282<pre class="literallayout"><span class="identifier">const_reverse_iterator</span> <a name="id-1_3_37_7_3_1_1_1_15_8-bb"></a><span class="identifier">crbegin</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre> 283<p><span class="bold"><strong>Complexity:</strong></span> O(1)</p> 284<p><span class="bold"><strong>Async-Handler-Safety</strong></span>: Safe. </p> 285</li> 286<li class="listitem"> 287<pre class="literallayout"><span class="identifier">const_reverse_iterator</span> <a name="id-1_3_37_7_3_1_1_1_15_9-bb"></a><span class="identifier">rend</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre> 288<p><span class="bold"><strong>Complexity:</strong></span> O(1)</p> 289<p><span class="bold"><strong>Async-Handler-Safety</strong></span>: Safe. </p> 290</li> 291<li class="listitem"> 292<pre class="literallayout"><span class="identifier">const_reverse_iterator</span> <a name="id-1_3_37_7_3_1_1_1_15_10-bb"></a><span class="identifier">crend</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre> 293<p><span class="bold"><strong>Complexity:</strong></span> O(1)</p> 294<p><span class="bold"><strong>Async-Handler-Safety</strong></span>: Safe. </p> 295</li> 296<li class="listitem"> 297<pre class="literallayout"><span class="keyword">explicit</span> <a name="id-1_3_37_7_3_1_1_1_15_11-bb"></a><span class="keyword">operator</span> <span class="keyword">bool</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>Allows to check that stack trace capturing was successful. <p> 298<span class="bold"><strong>Complexity:</strong></span> O(1)</p> 299<p><span class="bold"><strong>Async-Handler-Safety</strong></span>: Safe. </p> 300<div class="variablelist"><table border="0" class="variablelist compact"> 301<colgroup> 302<col align="left" valign="top"> 303<col> 304</colgroup> 305<tbody><tr> 306<td><p><span class="term">Returns:</span></p></td> 307<td><p><code class="computeroutput">true</code> if <code class="computeroutput">this->size() != 0</code></p></td> 308</tr></tbody> 309</table></div> 310</li> 311<li class="listitem"> 312<pre class="literallayout"><span class="keyword">bool</span> <a name="id-1_3_37_7_3_1_1_1_15_12-bb"></a><span class="identifier">empty</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>Allows to check that stack trace failed. <p> 313<span class="bold"><strong>Complexity:</strong></span> O(1)</p> 314<p><span class="bold"><strong>Async-Handler-Safety</strong></span>: Safe. </p> 315<div class="variablelist"><table border="0" class="variablelist compact"> 316<colgroup> 317<col align="left" valign="top"> 318<col> 319</colgroup> 320<tbody><tr> 321<td><p><span class="term">Returns:</span></p></td> 322<td><p><code class="computeroutput">true</code> if <code class="computeroutput">this->size() == 0</code></p></td> 323</tr></tbody> 324</table></div> 325</li> 326<li class="listitem"><pre class="literallayout"><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span> <a class="link" href="frame.html" title="Class frame">boost::stacktrace::frame</a><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">></span> <span class="special">&</span> 327<a name="id-1_3_37_7_3_1_1_1_15_13-bb"></a><span class="identifier">as_vector</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre></li> 328</ol></div> 329</div> 330<div class="refsect2"> 331<a name="id-1.3.37.7.2.3.4.6"></a><h3> 332<a name="id-1_3_37_7_3_1_1_1_24-bb"></a><code class="computeroutput">basic_stacktrace</code> public static functions</h3> 333<div class="orderedlist"><ol class="orderedlist" type="1"> 334<li class="listitem"> 335<pre class="literallayout"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> Char<span class="special">,</span> <span class="keyword">typename</span> Trait<span class="special">></span> 336 <span class="keyword">static</span> <a class="link" href="basic_stacktrace.html" title="Class template basic_stacktrace">basic_stacktrace</a> 337 <a name="id-1_3_37_7_3_1_1_1_24_1-bb"></a><span class="identifier">from_dump</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_istream</span><span class="special"><</span> <span class="identifier">Char</span><span class="special">,</span> <span class="identifier">Trait</span> <span class="special">></span> <span class="special">&</span> in<span class="special">,</span> 338 <span class="keyword">const</span> <span class="identifier">allocator_type</span> <span class="special">&</span> a <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre> 339<p>Constructs stacktrace from basic_istreamable that references the dumped stacktrace. Terminating zero frame is discarded.</p> 340<p><span class="bold"><strong>Complexity:</strong></span> O(N) </p> 341</li> 342<li class="listitem"> 343<pre class="literallayout"><span class="keyword">static</span> <a class="link" href="basic_stacktrace.html" title="Class template basic_stacktrace">basic_stacktrace</a> 344<a name="id-1_3_37_7_3_1_1_1_24_2-bb"></a><span class="identifier">from_dump</span><span class="special">(</span><span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span> begin<span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> buffer_size_in_bytes<span class="special">,</span> 345 <span class="keyword">const</span> <span class="identifier">allocator_type</span> <span class="special">&</span> a <span class="special">=</span> <span class="identifier">allocator_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre> 346<p>Constructs stacktrace from raw memory dump. Terminating zero frame is discarded.</p> 347<p> 348<span class="bold"><strong>Complexity:</strong></span> O(size) in worst case </p> 349<div class="variablelist"><table border="0" class="variablelist compact"> 350<colgroup> 351<col align="left" valign="top"> 352<col> 353</colgroup> 354<tbody><tr> 355<td><p><span class="term">Parameters:</span></p></td> 356<td><div class="variablelist"><table border="0" class="variablelist compact"> 357<colgroup> 358<col align="left" valign="top"> 359<col> 360</colgroup> 361<tbody> 362<tr> 363<td><p><span class="term"><code class="computeroutput">begin</code></span></p></td> 364<td><p>Begining of the memory where the stacktrace was saved using the boost::stacktrace::safe_dump_to</p></td> 365</tr> 366<tr> 367<td><p><span class="term"><code class="computeroutput">buffer_size_in_bytes</code></span></p></td> 368<td><p>Size of the memory. Usually the same value that was passed to the boost::stacktrace::safe_dump_to</p></td> 369</tr> 370</tbody> 371</table></div></td> 372</tr></tbody> 373</table></div> 374</li> 375</ol></div> 376</div> 377</div> 378</div> 379<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 380<td align="left"></td> 381<td align="right"><div class="copyright-footer">Copyright © 2016-2020 Antony Polukhin<p> 382 Distributed under the Boost Software License, Version 1.0. (See accompanying 383 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 384 </p> 385</div></td> 386</tr></table> 387<hr> 388<div class="spirit-nav"> 389<a accesskey="p" href="../../stacktrace/reference.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../stacktrace/reference.html#header.boost.stacktrace.stacktrace_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="operator_1_3_37_7_3_1_1_3.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 390</div> 391</body> 392</html> 393