microfmt
Zero-allocation C++ formatting for constrained environments
Loading...
Searching...
No Matches
Public Member Functions | List of all members
microfmt::unwind_hint_registry_context< MaxHints > Class Template Reference

Zero-allocation hint registry with fixed capacity. More...

#include <unwind_hint.hpp>

Public Member Functions

constexpr unwind_hint_registry_context () noexcept=default
 Constructs an empty registry.
 
constexpr bool add_hint (const unwind_hint &hint) noexcept
 Appends a hint to the registry.
 
constexpr bool find_hint (uintptr_t pc, unwind_hint &out_hint) const noexcept
 Linear scan for the hint covering a PC.
 
constexpr size_t size () const noexcept
 Returns the number of stored hints.
 

Detailed Description

template<size_t MaxHints>
class microfmt::unwind_hint_registry_context< MaxHints >

Zero-allocation hint registry with fixed capacity.

Template Parameters
MaxHintsMaximum number of stored hints.

Constructor & Destructor Documentation

◆ unwind_hint_registry_context()

template<size_t MaxHints>
constexpr microfmt::unwind_hint_registry_context< MaxHints >::unwind_hint_registry_context ( )
constexprdefaultnoexcept

Constructs an empty registry.

Member Function Documentation

◆ add_hint()

template<size_t MaxHints>
constexpr bool microfmt::unwind_hint_registry_context< MaxHints >::add_hint ( const unwind_hint &  hint)
inlineconstexprnoexcept

Appends a hint to the registry.

Parameters
hintHint to store.
Returns
false when the registry is full.

◆ find_hint()

template<size_t MaxHints>
constexpr bool microfmt::unwind_hint_registry_context< MaxHints >::find_hint ( uintptr_t  pc,
unwind_hint &  out_hint 
) const
inlineconstexprnoexcept

Linear scan for the hint covering a PC.

Parameters
pcPC being looked up.
out_hintReceives the matching hint.
Returns
true when a hint matched.

◆ size()

template<size_t MaxHints>
constexpr size_t microfmt::unwind_hint_registry_context< MaxHints >::size ( ) const
inlineconstexprnoexcept

Returns the number of stored hints.

Returns
Current hint count.

The documentation for this class was generated from the following file: