std::operator<<(std::stacktrace_entry)
From cppreference.com
< cpp | utility | 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 のストリーム出力を行う(function template) |