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

> C++ Atlas: `cppatlas.com/w/cpp/utility/stacktrace_entry/operator_ltlt` | Source: https://en.cppreference.com/w/cpp/utility/stacktrace_entry/operator_ltlt | Domain: Utility | Standards: C++23

Inserts the description of f into the output stream os. Equivalent to return os << std::to_string(f);.

## Official Specification Summary (cppreference)

```cpp
// Defined in header <stacktrace>
std::ostream& operator<<( std::ostream& os, const std::stacktrace_entry& f ); // (since C++23)
```

Inserts the description of `f` into the output stream `os`. Equivalent to `return os << std::to_string(f);`.

### Parameters

- `os` - an output stream
- `f` - a `stacktrace_entry` whose description is to be inserted

### Return value

`os`

### Exceptions

May throw implementation-defined exceptions.

### Example

```cpp
#include <iostream>
#include <stacktrace>

int main()
{
    for (const auto& f : std::stacktrace::current())
        std::cout << f << '\n';
}
```

Possible output:

```text
0x0000000000402AA7 in ./prog.exe
__libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
0x00000000004029B9 in ./prog.exe
```

### See also

- [`operator<<`](https://en.cppreference.com/w/cpp/utility/basic_stacktrace/operator_ltlt) (C++23): performs stream output of `basic_stracktrace` (function template)

---
Attribution: content from https://en.cppreference.com/w/cpp/utility/stacktrace_entry/operator_ltlt (cppreference.com), licensed under CC-BY-SA 3.0 and GFDL. Modified: converted to markdown, study notes added. Offline snapshot of 9 February 2025.