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

定义于头文件 <stacktrace>
template< class CharT, class Traits >

std::basic_ostream<CharT, Traits>&

    operator<<( std::basic_ostream<CharT, Traits>& os, const std::stacktrace_entry& f );
(C++23 起)

插入 f 的描述到输出流 os 中。等价于 return os << std::to_string(f);

参数

os - 输出流
f - 要插入其描述的 stacktrace_entry

返回值

os

异常

可能抛出实现定义的异常。

注解

由于 std::string 只能由 std::ostream 输出(例如不能由 std::wostream ),这等效地要求 os 的类型为 std::ostream&

示例