Forward-only cursor iterating over a chain of trap frames.
More...
#include <exception_frame.hpp>
|
| constexpr | exception_frame_iterator () noexcept=default |
| | Constructs an empty (invalid) iterator.
|
| |
| constexpr | exception_frame_iterator (exception_frame_ref decoder, uintptr_t initial_trap_frame_addr) noexcept |
| | Constructs an iterator rooted at the given trap frame.
|
| |
| constexpr const trap_context & | operator* () const noexcept |
| | Returns the current decoded trap context.
|
| |
| constexpr const trap_context * | operator-> () const noexcept |
| | Returns the current decoded trap context.
|
| |
| constexpr bool | has_value () const noexcept |
| | Reports whether the iterator is positioned on a trap frame.
|
| |
| constexpr | operator bool () const noexcept |
| | Reports whether the iterator is positioned on a trap frame.
|
| |
| bool | next () noexcept |
| | Advances to the next (outer/nested) trap frame.
|
| |
| exception_frame_iterator & | operator++ () noexcept |
| | Pre-increment advancing to the next trap frame.
|
| |
| template<typename Visitor > |
| void | for_each_trap (Visitor &&visitor, uint32_t max_traps=8) noexcept |
| | Visitor-style traversal over the trap chain.
|
| |
Forward-only cursor iterating over a chain of trap frames.
◆ exception_frame_iterator() [1/2]
| constexpr microfmt::exception_frame_iterator::exception_frame_iterator |
( |
| ) |
|
|
constexprdefaultnoexcept |
Constructs an empty (invalid) iterator.
◆ exception_frame_iterator() [2/2]
| constexpr microfmt::exception_frame_iterator::exception_frame_iterator |
( |
exception_frame_ref |
decoder, |
|
|
uintptr_t |
initial_trap_frame_addr |
|
) |
| |
|
inlineconstexprnoexcept |
Constructs an iterator rooted at the given trap frame.
- Parameters
-
| decoder | Trap-frame decoder driving the iteration. |
| initial_trap_frame_addr | Address of the first trap frame. |
◆ for_each_trap()
template<typename Visitor >
| void microfmt::exception_frame_iterator::for_each_trap |
( |
Visitor && |
visitor, |
|
|
uint32_t |
max_traps = 8 |
|
) |
| |
|
inlinenoexcept |
Visitor-style traversal over the trap chain.
- Template Parameters
-
| Visitor | Callable accepting const trap_context & and returning bool (true = continue). |
- Parameters
-
| visitor | Visitor invoked per trap frame. |
| max_traps | Maximum trap level to visit. |
◆ has_value()
| constexpr bool microfmt::exception_frame_iterator::has_value |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Reports whether the iterator is positioned on a trap frame.
- Returns
true while the current frame is valid.
◆ next()
| bool microfmt::exception_frame_iterator::next |
( |
| ) |
|
|
inlinenoexcept |
Advances to the next (outer/nested) trap frame.
- Returns
false when the chain ends.
◆ operator bool()
| constexpr microfmt::exception_frame_iterator::operator bool |
( |
| ) |
const |
|
inlineexplicitconstexprnoexcept |
Reports whether the iterator is positioned on a trap frame.
- Returns
true while the current frame is valid.
◆ operator*()
| constexpr const trap_context & microfmt::exception_frame_iterator::operator* |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Returns the current decoded trap context.
- Returns
- Reference to the current trap_context.
◆ operator++()
Pre-increment advancing to the next trap frame.
- Returns
- This iterator.
◆ operator->()
| constexpr const trap_context * microfmt::exception_frame_iterator::operator-> |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Returns the current decoded trap context.
- Returns
- Pointer to the current trap_context.
The documentation for this class was generated from the following file: