|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Defined in header <stacktrace> | ||
template<class Allocator> std::ostream& operator<<(std::ostream& os,conststd::basic_stacktrace<Allocator>& st); | (since C++23) | |
Inserts the description ofst into the output streamos. Equivalent toreturn os<<std::to_string(st);.
Contents |
| os | - | an output stream |
| st | - | abasic_stacktrace whose description is to be inserted |
os.
May throw implementation-defined exceptions.
Possible output:
The stacktrace obtained in the main function: 0# 0x0000000000402E7B in ./prog.exe 1# __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6 2# 0x0000000000402CD9 in ./prog.exe The stacktrace obtained in a nested lambda: 0# 0x0000000000402DDA in ./prog.exe 1# 0x0000000000402EB2 in ./prog.exe 2# __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6 3# 0x0000000000402CD9 in ./prog.exe
(C++23) | performs stream output ofstacktrace_entry(function template)[edit] |