std:: operator<< (std::stacktrace_entry)
From cppreference.net
<
cpp
|
utility
|
stacktrace entry
C++
Diagnostics library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::stacktrace_entry
|
ヘッダーで定義
<stacktrace>
|
||
|
std::
ostream
&
operator
<<
(
std::
ostream
&
os,
const
std::
stacktrace_entry
&
f
)
;
|
(C++23以降) | |
f の説明を出力ストリーム os に挿入します。 return os << std:: to_string ( f ) ; と等価です。
目次 |
パラメータ
| os | - | 出力ストリーム |
| f | - |
記述が挿入される
stacktrace_entry
|
戻り値
os
例外
実装定義の例外をスローする可能性があります。
例
このコードを実行
#include <iostream> #include <stacktrace> int main() { for (const auto& f : std::stacktrace::current()) std::cout << f << '\n'; }
出力例:
0x0000000000402AA7 in ./prog.exe __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6 0x00000000004029B9 in ./prog.exe
関連項目
|
(C++23)
|
basic_stracktrace
のストリーム出力を実行する
(関数テンプレート) |