名前空間
変種
操作

std::operator<<(std::stacktrace_entry)

From cppreference.com
 
 
 
 
ヘッダー <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

[編集] 関連項目

basic_stracktrace のストリーム出力を行う
(function template) [編集]
English 日本語 中文(简体) 中文(繁體)