|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Defined in header <stacktrace> | ||
std::ostream& operator<<(std::ostream& os,conststd::stacktrace_entry& f); | (since C++23) | |
Inserts the description off into the output streamos. Equivalent toreturn os<<std::to_string(f);.
Contents |
| os | - | an output stream |
| f | - | astacktrace_entry whose description is to be inserted |
os
May throw implementation-defined exceptions.
#include <iostream>#include <stacktrace> int main(){for(constauto& f: std::stacktrace::current())std::cout<< f<<'\n';}
Possible output:
0x0000000000402AA7 in ./prog.exe__libc_start_main in /lib/x86_64-linux-gnu/libc.so.60x00000000004029B9 in ./prog.exe
(C++23) | performs stream output ofbasic_stracktrace(function template)[edit] |