std::basic_stacktrace<Allocator>::current
From cppreference.com
< cpp | utility | basic stacktrace
| static basic_stacktrace current( const allocator_type& alloc = allocator_type() ) noexcept; |
(1) | (C++23から) |
| static basic_stacktrace current( size_type skip, const allocator_type& alloc = allocator_type() ) noexcept; |
(2) | (C++23から) |
| static basic_stacktrace current( size_type skip, size_type max_depth, const allocator_type& alloc = |
(3) | (C++23から) |
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) s[0], s[1], ..., s[n - 1] で構成される
basic_stacktrace の作成を試みます。2) s[m], s[m + 1], ..., s[n - 1] で構成される
basic_stacktrace の作成を試みます。ここで、m は min(skip, n) です。3) s[m], s[m + 1], ..., s[o - 1] で構成される
basic_stacktrace の作成を試みます。ここで、m は min(skip, n) であり、o は min(skip + max_depth, n) です。skip + max_depth < skip (つまり、skip + max_depth の数学的な結果がオーバーフローする場合) は未定義の動作です。すべてのケースで、alloc は作成された basic_stacktrace に格納され、スタックトレースエントリのストレージを割り当てるために使用されます。
目次 |
[編集] パラメータ
| alloc | - | 作成される basic_stacktrace のすべてのメモリ割り当てに使用されるアロケータ |
| skip | - | スキップするスタックトレースエントリの数 |
| max_depth | - | スタックトレースエントリの最大深度 |
[編集] 戻り値
割り当てが成功した場合、上記で説明した basic_stacktrace。
それ以外の場合は、空の basic_stacktrace。
[編集] 例
| このセクションは未完成です 理由: 例がありません |
[編集] 関連項目
新しい basic_stacktrace を生成する(public member function) | |
| [static] |
呼び出し元の位置に対応する新しい source_location を構築する( std::source_location の public static メンバ関数) |