microfmt
Zero-allocation C++ formatting for constrained environments
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions | Variables
microfmt::detail Namespace Reference

Classes

struct  basic_string_query_layout
 
struct  binary_tree_layout_tag
 
struct  boost_sequence_formatter
 
struct  c_string_sink_base
 
struct  carray_layout_tag
 
struct  civil_date
 
struct  compiled_format
 
struct  compiled_piece
 
struct  compiled_string_storage
 
struct  const_char_like
 
struct  debug_view
 Non-owning wrapper produced by as_debug, carrying no state of its own beyond a reference to the wrapped value; all the priority logic lives in formatter<debug_view<T>>::format below. More...
 
struct  dl_enumerate_state
 Mutable state threaded through dl_enumerate_callback. More...
 
struct  dl_find_size_state
 State used by dl_find_size_callback to locate the PT_LOAD (and, where available, PT_ARM_EXIDX/PT_GNU_EH_FRAME) bounds of the image whose load base was already resolved via dladdr. More...
 
struct  duration_suffix
 
struct  duration_suffix< std::micro >
 
struct  duration_suffix< std::milli >
 
struct  duration_suffix< std::nano >
 
struct  duration_suffix< std::ratio< 1 > >
 
struct  duration_suffix< std::ratio< 3600 > >
 
struct  duration_suffix< std::ratio< 60 > >
 
struct  duration_suffix< std::ratio< 86400 > >
 
struct  element_formatter
 Drop-in replacement for a formatter<T> underlying_formatter; member used by container/wrapper formatters (reloco.hpp, tuple.hpp, map_view.hpp, filter_view.hpp, ranges.hpp, variant.hpp, ...) to format their elements/keys/values. More...
 
struct  fallible_space_tls_tag
 Unique tag to isolate the fallible address space's TLS storage slot. More...
 
struct  fault_recovery_context
 Context holding the jump buffer and active state for signal-safe memory fault recovery. More...
 
struct  fix_type
 Collapses argument types to a canonical representative before they reach format_type_table, so that types differing only in ways that format_type_thunk doesn't actually care about don't each generate their own thunk/table instantiation. More...
 
struct  fix_type< char[N]>
 
struct  fix_type< const char[N]>
 
struct  format_args_store
 Stack storage for type-erased argument pointers. More...
 
struct  format_args_store<>
 
struct  format_type_table
 
struct  format_type_table<>
 
struct  forward_list_layout_tag
 
struct  has_address_space_write_bytes
 
struct  has_address_space_write_bytes< Tag, std::void_t< decltype(address_space_traits< Tag >::write_bytes(std::declval< value_ref< const typename address_space_traits< Tag >::context_type > >(), std::declval< uintptr_t >(), std::declval< const void * >(), std::declval< size_t >()))> >
 
struct  has_append
 
struct  has_append< Container, std::void_t< decltype(std::declval< Container & >().append(std::declval< const char * >(), std::declval< std::size_t >()))> >
 
struct  has_data
 
struct  has_data< T, std::void_t< decltype(std::declval< T & >().data())> >
 
struct  has_data_size_impl
 
struct  has_data_size_impl< Container, std::void_t< decltype(std::declval< Container & >().data()), decltype(std::declval< Container & >().size())> >
 
struct  has_first_member
 
struct  has_first_member< T, std::void_t< decltype(std::declval< const T & >().first)> >
 
struct  has_formatter
 Detects whether formatter<T> has been given a definition (as opposed to just matching the template <typename T, typename Enable = void> struct formatter; forward declaration), using the standard decltype(sizeof(T)) completeness-detection idiom: sizeof of an incomplete type in the immediate context of a partial specialization's template argument substitution is a SFINAE failure, not a hard error. More...
 
struct  has_formatter< T, std::void_t< decltype(sizeof(formatter< T >))> >
 
struct  has_key_method
 
struct  has_key_method< T, std::void_t< decltype(std::declval< const T & >().key())> >
 
struct  has_range_insert
 
struct  has_range_insert< Container, std::void_t< decltype(std::declval< Container & >().insert(std::declval< Container & >().end(), std::declval< const char * >(), std::declval< const char * >()))> >
 
struct  has_register_context_read
 
struct  has_register_context_read< Tag, std::void_t< decltype(register_context_traits< Tag >::read_register(std::declval< value_ref< const typename register_context_traits< Tag >::context_type > >(), std::declval< address_space_ref >(), std::declval< uint32_t >(), std::declval< void * >(), std::declval< size_t >()))> >
 
struct  has_register_context_write
 
struct  has_register_context_write< Tag, std::void_t< decltype(register_context_traits< Tag >::write_register(std::declval< value_ref< typename register_context_traits< Tag >::context_type > >(), std::declval< address_space_ref >(), std::declval< uint32_t >(), std::declval< const void * >(), std::declval< size_t >()))> >
 
struct  has_resolve_fp_reg
 
struct  has_resolve_fp_reg< AbiTraits, std::void_t< decltype(AbiTraits::resolve_fp_reg(std::declval< register_context_ref >()))> >
 
struct  has_resolve_frame_slot_offsets
 
struct  has_resolve_frame_slot_offsets< AbiTraits, std::void_t< decltype(AbiTraits::resolve_frame_slot_offsets(std::declval< register_context_ref >(), std::declval< ptrdiff_t & >(), std::declval< ptrdiff_t & >()))> >
 
struct  has_second_member
 
struct  has_second_member< T, std::void_t< decltype(std::declval< const T & >().second)> >
 
struct  has_sink_provider_flush
 
struct  has_sink_provider_flush< Tag, std::void_t< decltype(sink_provider_traits< Tag >::flush(std::declval< value_ref< typename sink_provider_traits< Tag >::context_type > >()))> >
 
struct  has_stateless_address_space_write_bytes
 
struct  has_stateless_address_space_write_bytes< Tag, std::void_t< decltype(address_space_traits< Tag >::write_bytes(std::declval< uintptr_t >(), std::declval< const void * >(), std::declval< size_t >()))> >
 
struct  has_stateless_sink_provider_flush
 
struct  has_stateless_sink_provider_flush< Tag, std::void_t< decltype(sink_provider_traits< Tag >::flush())> >
 
struct  has_std_push_back
 
struct  has_std_push_back< Container, std::void_t< decltype(std::declval< Container & >().push_back(char{}))> >
 
struct  has_try_append
 
struct  has_try_append< Container, std::void_t< decltype(static_cast< bool >(std::declval< Container & >().try_append(microfmt::string_view{})))> >
 
struct  has_try_push_back
 
struct  has_try_push_back< Container, std::void_t< decltype(static_cast< bool >(std::declval< Container & >().try_push_back(char{})))> >
 
struct  has_value_method
 
struct  has_value_method< T, std::void_t< decltype(std::declval< const T & >().value())> >
 
struct  hash_table_layout_tag
 
struct  int_formatter_specs
 
struct  is_bintime_struct
 
struct  is_bintime_struct< T, std::void_t< decltype(std::declval< T >().sec), decltype(std::declval< T >().frac)> >
 
struct  is_dereferenceable
 
struct  is_dereferenceable< T, std::void_t< decltype(*std::declval< T & >())> >
 
struct  is_described_enum
 
struct  is_growable_char_container_impl
 
struct  is_hashable
 SFINAE trait detecting types invocable through std::hash<T>. More...
 
struct  is_hashable< T, std::void_t< decltype(std::hash< T >{}(std::declval< const T & >()))> >
 Specialization enabling is_hashable when std::hash<T> is callable. More...
 
struct  is_mac_container
 
struct  is_mac_container< T, std::void_t< decltype(std::declval< const T & >().data()), decltype(std::declval< const T & >().size())> >
 
struct  is_range
 
struct  is_range< T, std::void_t< decltype(std::begin(std::declval< const T & >())), decltype(std::end(std::declval< const T & >()))> >
 
struct  is_timespec_like
 SFINAE trait detecting timespec-like types with tv_sec/tv_nsec. More...
 
struct  is_timespec_like< T, std::void_t< decltype(std::declval< T >().tv_sec), decltype(std::declval< T >().tv_nsec)> >
 Specialization enabling is_timespec_like for types exposing tv_sec and tv_nsec members. More...
 
struct  is_timeval_like
 SFINAE trait detecting timeval-like types with tv_sec/tv_usec. More...
 
struct  is_timeval_like< T, std::void_t< decltype(std::declval< T >().tv_sec), decltype(std::declval< T >().tv_usec)> >
 Specialization enabling is_timeval_like for types exposing tv_sec and tv_usec members. More...
 
struct  is_tuple_like
 
struct  is_tuple_like< T, std::void_t< decltype(std::tuple_size< remove_cvref_t< T > >::value)> >
 
struct  is_uuid_container
 
struct  is_uuid_container< T, std::void_t< decltype(std::declval< const T & >().data()), decltype(std::declval< const T & >().size())> >
 
struct  mapped_register_context_tag
 
class  memory_buffer_base
 Non-templated base class for dynamically growing buffers. More...
 
struct  parsed_float_spec
 Parsed floating-point format specifier state. More...
 
struct  parsed_string_spec
 Parsed advanced string format specifier state. More...
 
struct  raw_ptr_format
 
struct  remote_binary_tree_dispatch
 
struct  remote_forward_list_dispatch
 
struct  remote_hash_table_dispatch
 
struct  remote_vector_dispatch
 
struct  size_selected_data_query
 
struct  vector_layout_tag
 

Typedefs

template<typename T >
using is_described_struct = boost::describe::has_describe_members< T >
 
template<typename T >
using remove_cvref_map_t = typename std::remove_cv< typename std::remove_reference< T >::type >::type
 
template<typename T >
using remove_cvref_t = typename std::remove_cv< typename std::remove_reference< T >::type >::type
 
using fallible_tls = reloco::tls_provider< fault_recovery_context *, fallible_space_tls_tag >
 
template<typename T >
using microfmt_remove_cvref_t = std::remove_cv_t< std::remove_reference_t< T > >
 
template<typename T >
using fix_type_t = typename fix_type< T >::type
 

Enumerations

enum class  string_align : uint8_t { none , left , right , center }
 Horizontal alignment mode for padded string output. More...
 

Functions

uint64_t bintime_frac_to_decimal (uint64_t frac, time_precision prec) noexcept
 Converts a bintime fractional part into decimal-scaling digits.
 
uint32_t sbintime_frac_to_decimal (uint32_t frac32, time_precision prec) noexcept
 Converts an sbintime_t fractional part into decimal-scaling digits.
 
void format_boost_address_v4 (const boost::asio::ip::address_v4 &address, const sink &out) noexcept
 
void format_boost_address_v6 (const boost::asio::ip::address_v6 &address, const sink &out) noexcept
 
template<typename Period >
constexpr microfmt::string_view boost_duration_suffix () noexcept
 
void format_boost_date (const boost::gregorian::date &date, const sink &out) noexcept
 
void format_boost_time_duration (const boost::posix_time::time_duration &duration, const sink &out) noexcept
 
RELOCO_BEGIN_UNSAFE_CODE constexpr civil_date civil_from_days (int32_t z) noexcept
 
RELOCO_BEGIN_UNSAFE_CODE void write_errno_string (const sink &out, int value) noexcept
 
constexpr uint64_t ct_pow10 (uint8_t exp) noexcept
 
constexpr parsed_float_spec parse_float_spec (microfmt::string_view spec) noexcept
 Parses a floating-point format specifier string.
 
template<typename T >
RELOCO_UNSAFE_BUFFER_USAGE size_t build_printf_float_format (char *dest, const parsed_float_spec &spec) noexcept
 Builds a printf-style format string into a caller buffer.
 
template<typename T >
RELOCO_BEGIN_UNSAFE_CODE RELOCO_UNSAFE_BUFFER_USAGE void format_float_via_printf (T val, const parsed_float_spec &spec, const sink &out) noexcept
 Formats a floating-point value via snprintf into the given sink.
 
template<typename Formatter , typename Range >
void format_reloco_sequence (const Formatter &elem_formatter, const Range &range, const sink &out) noexcept
 
template<typename KeyFormatter , typename ValueFormatter , typename Range >
void format_reloco_map (const KeyFormatter &key_formatter, const ValueFormatter &value_formatter, const Range &range, const sink &out) noexcept
 
RELOCO_BEGIN_UNSAFE_CODE constexpr parsed_string_spec parse_advanced_string_spec (microfmt::string_view spec) noexcept
 Parses an advanced string specifier: [[fill]align][width][.precision][?].
 
RELOCO_END_UNSAFE_CODE void write_fill_chars (const sink &out, char fill, size_t count) noexcept
 Writes count copies of fill to the sink in bounded chunks.
 
void write_escaped_character (const sink &out, char ch) noexcept
 Writes a single character with C-style debug escaping.
 
size_t calculate_escaped_len (microfmt::string_view sv) noexcept
 Computes the rendered character count of a debug-escaped string.
 
template<typename Tuple , size_t... Is>
void format_tuple_impl (const Tuple &t, const sink &out, microfmt::string_view sep, microfmt::string_view spec, std::index_sequence< Is... >) noexcept
 
MICROFMT_API void format_uuid_bytes (const sink &out, span< const uint8_t > bytes, bool is_upper, bool is_braced) noexcept
 
RELOCO_BEGIN_UNSAFE_CODE constexpr uintptr_t add_address_offset (uintptr_t address, ptrdiff_t offset) noexcept
 
bool dl_phdr_image_bounds (const dl_phdr_info &info, uintptr_t &out_base, uintptr_t &out_size) noexcept
 Computes the runtime [base, base + size) range covered by an image's PT_LOAD segments.
 
RELOCO_BEGIN_UNSAFE_CODE int dl_enumerate_callback (dl_phdr_info *info, size_t, void *data) noexcept
 dl_iterate_phdr callback that fills dl_enumerate_state::buffer with one elf_image_info per loaded image, stopping once full.
 
RELOCO_END_UNSAFE_CODE bool dl_enumerate_images (span< elf_image_info > out_buffer, size_t &out_count) noexcept
 Fills out_buffer with every image currently reported by dl_iterate_phdr, up to its capacity.
 
RELOCO_BEGIN_UNSAFE_CODE int dl_find_size_callback (dl_phdr_info *info, size_t, void *data) noexcept
 dl_iterate_phdr callback that records the mapped size (and, where available, the .ARM.exidx/.eh_frame bounds) of the image whose base address matches dl_find_size_state::target_base.
 
RELOCO_END_UNSAFE_CODE RELOCO_BEGIN_UNSAFE_CODE bool dl_find_by_pc (uintptr_t pc, elf_image_info &out_info) noexcept
 Resolves the image owning pc via dladdr, then cross-references dl_iterate_phdr to fill in the image's mapped size and, where available, its .ARM.exidx/.eh_frame bounds.
 
RELOCO_BEGIN_UNSAFE_CODE bool dl_resolve_symbol (uintptr_t addr, raw_resolved_symbol &out_raw) noexcept
 Resolves addr to its nearest preceding symbol/image via dladdr.
 
fault_recovery_context * fallible_tls_get () noexcept
 Unwraps fallible_tls::get()'s result to a plain pointer.
 
bool fallible_tls_set (fault_recovery_context *ctx) noexcept
 Sets the calling thread's recovery-context slot; returns false if the underlying tls_provider::set() itself failed (surfaced to callers the same way a fault during the guarded copy is).
 
void fallible_signal_handler (int sig, siginfo_t *, void *) noexcept
 
bool install_fallible_handlers () noexcept
 
template<typename To , typename From >
constexpr bool convert_remote_layout_value (From value, To &out) noexcept
 
template<typename T >
bool format_remote_vector_element (address_space_ref space, span< std::byte > scratch, uintptr_t element_addr, const sink &out) noexcept
 
bool ucontext_read_register (const void *ctx, address_space_ref, uint32_t dwarf_reg_index, void *out_value, size_t value_size) noexcept
 Reads a general-purpose register out of a POSIX ucontext_t by its DWARF register index (see microfmt::dwarf).
 
bool ucontext_write_register (void *ctx, address_space_ref, uint32_t dwarf_reg_index, const void *in_value, size_t value_size) noexcept
 Writes a general-purpose register into a POSIX ucontext_t by its DWARF register index (see microfmt::dwarf).
 
template<typename UInt >
RELOCO_ALWAYS_INLINE RELOCO_UNSAFE_BUFFER_USAGE RELOCO_CONSTEXPR20 char * format_dec_backward (char *ptr, UInt value) noexcept
 
template<typename UInt >
RELOCO_UNSAFE_BUFFER_USAGE RELOCO_ALWAYS_INLINE RELOCO_CONSTEXPR20 char * format_hex_backward (char *ptr, UInt value, bool uppercase) noexcept
 
RELOCO_BEGIN_UNSAFE_CODE RELOCO_ALWAYS_INLINE void emit_formatted_int (const sink &out, const char *digits, size_t digits_len, bool is_negative, microfmt::string_view prefix, uint8_t width, bool zero_pad) noexcept
 
template<typename T >
RELOCO_BEGIN_UNSAFE_CODE void format_type_thunk (const void *val_ptr, microfmt::string_view spec, const sink &out) noexcept
 
constexpr bool starts_with (microfmt::string_view sv, microfmt::string_view prefix) noexcept
 
constexpr bool starts_with (microfmt::string_view sv, char c) noexcept
 
RELOCO_BEGIN_UNSAFE_CODE constexpr bool parse_positional_index (microfmt::string_view text, size_t &index) noexcept
 
template<size_t MaxPieces = 32>
constexpr compiled_format< MaxPieces > compile_format_string (microfmt::string_view str) noexcept
 
template<size_t TargetIdx, size_t CurIdx, typename T , typename... Rest>
RELOCO_BEGIN_UNSAFE_CODE RELOCO_ALWAYS_INLINE const void * get_arg_by_index (const T &first, const Rest &...rest) noexcept
 
template<typename StrProvider , size_t PieceIdx, typename... Args>
RELOCO_ALWAYS_INLINE void emit_piece_by_index (const sink &out, const std::tuple< const Args &... > &arg_tuple) noexcept
 
template<typename StrProvider , typename... Args, size_t... Is>
RELOCO_ALWAYS_INLINE void unrolled_format_impl (const sink &out, std::index_sequence< Is... >, const Args &...args) noexcept
 

Variables

template<typename T >
constexpr bool is_hashable_v = is_hashable<T>::value
 Convenience variable template for is_hashable.
 
template<typename T >
constexpr bool has_formatter_v = has_formatter<T>::value
 

Typedef Documentation

◆ fallible_tls

◆ fix_type_t

template<typename T >
using microfmt::detail::fix_type_t = typedef typename fix_type<T>::type

◆ is_described_struct

template<typename T >
using microfmt::detail::is_described_struct = typedef boost::describe::has_describe_members<T>

◆ microfmt_remove_cvref_t

template<typename T >
using microfmt::detail::microfmt_remove_cvref_t = typedef std::remove_cv_t<std::remove_reference_t<T> >

◆ remove_cvref_map_t

template<typename T >
using microfmt::detail::remove_cvref_map_t = typedef typename std::remove_cv<typename std::remove_reference<T>::type>::type

◆ remove_cvref_t

template<typename T >
using microfmt::detail::remove_cvref_t = typedef typename std::remove_cv<typename std::remove_reference<T>::type>::type

Enumeration Type Documentation

◆ string_align

enum class microfmt::detail::string_align : uint8_t
strong

Horizontal alignment mode for padded string output.

Enumerator
none 
left 
right 
center 

Function Documentation

◆ add_address_offset()

RELOCO_BEGIN_UNSAFE_CODE constexpr uintptr_t microfmt::detail::add_address_offset ( uintptr_t  address,
ptrdiff_t  offset 
)
constexprnoexcept

◆ bintime_frac_to_decimal()

uint64_t microfmt::detail::bintime_frac_to_decimal ( uint64_t  frac,
time_precision  prec 
)
inlinenoexcept

Converts a bintime fractional part into decimal-scaling digits.

Parameters
fracFractional seconds expressed in 2^-64 units.
precTarget decimal precision.
Returns
Decimal-scaled fractional value, or 0 for sec precision.

◆ boost_duration_suffix()

template<typename Period >
constexpr microfmt::string_view microfmt::detail::boost_duration_suffix ( )
constexprnoexcept

◆ build_printf_float_format()

template<typename T >
RELOCO_UNSAFE_BUFFER_USAGE size_t microfmt::detail::build_printf_float_format ( char *  dest,
const parsed_float_spec &  spec 
)
inlinenoexcept

Builds a printf-style format string into a caller buffer.

Template Parameters
TFloating type (adds the L prefix for long double).
Parameters
destOutput buffer (must fit the produced format string).
specParsed format specifier to translate.
Returns
Number of bytes written to dest, excluding the null terminator.

◆ calculate_escaped_len()

size_t microfmt::detail::calculate_escaped_len ( microfmt::string_view  sv)
inlinenoexcept

Computes the rendered character count of a debug-escaped string.

Parameters
svString to measure (including the surrounding quotes).
Returns
Rendered length in characters.

◆ civil_from_days()

RELOCO_BEGIN_UNSAFE_CODE constexpr civil_date microfmt::detail::civil_from_days ( int32_t  z)
inlineconstexprnoexcept

◆ compile_format_string()

template<size_t MaxPieces = 32>
constexpr compiled_format< MaxPieces > microfmt::detail::compile_format_string ( microfmt::string_view  str)
constexprnoexcept

◆ convert_remote_layout_value()

template<typename To , typename From >
constexpr bool microfmt::detail::convert_remote_layout_value ( From  value,
To &  out 
)
constexprnoexcept

◆ ct_pow10()

constexpr uint64_t microfmt::detail::ct_pow10 ( uint8_t  exp)
constexprnoexcept

◆ dl_enumerate_callback()

RELOCO_BEGIN_UNSAFE_CODE int microfmt::detail::dl_enumerate_callback ( dl_phdr_info *  info,
size_t  ,
void *  data 
)
inlinenoexcept

dl_iterate_phdr callback that fills dl_enumerate_state::buffer with one elf_image_info per loaded image, stopping once full.

◆ dl_enumerate_images()

RELOCO_END_UNSAFE_CODE bool microfmt::detail::dl_enumerate_images ( span< elf_image_info >  out_buffer,
size_t &  out_count 
)
inlinenoexcept

Fills out_buffer with every image currently reported by dl_iterate_phdr, up to its capacity.

Parameters
out_bufferDestination buffer for image records.
out_countReceives the number of images written (<= out_buffer.size()).
Returns
Always true.

◆ dl_find_by_pc()

RELOCO_END_UNSAFE_CODE RELOCO_BEGIN_UNSAFE_CODE bool microfmt::detail::dl_find_by_pc ( uintptr_t  pc,
elf_image_info &  out_info 
)
inlinenoexcept

Resolves the image owning pc via dladdr, then cross-references dl_iterate_phdr to fill in the image's mapped size and, where available, its .ARM.exidx/.eh_frame bounds.

Parameters
pcCode address to look up.
out_infoReceives the owning image record.
Returns
true when dladdr located an owning image.

◆ dl_find_size_callback()

RELOCO_BEGIN_UNSAFE_CODE int microfmt::detail::dl_find_size_callback ( dl_phdr_info *  info,
size_t  ,
void *  data 
)
inlinenoexcept

dl_iterate_phdr callback that records the mapped size (and, where available, the .ARM.exidx/.eh_frame bounds) of the image whose base address matches dl_find_size_state::target_base.

◆ dl_phdr_image_bounds()

bool microfmt::detail::dl_phdr_image_bounds ( const dl_phdr_info &  info,
uintptr_t &  out_base,
uintptr_t &  out_size 
)
inlinenoexcept

Computes the runtime [base, base + size) range covered by an image's PT_LOAD segments.

Parameters
infoProgram-header info supplied by dl_iterate_phdr.
out_baseReceives the lowest mapped address.
out_sizeReceives the total mapped size.
Returns
true when at least one PT_LOAD segment was found.

◆ dl_resolve_symbol()

RELOCO_BEGIN_UNSAFE_CODE bool microfmt::detail::dl_resolve_symbol ( uintptr_t  addr,
raw_resolved_symbol &  out_raw 
)
inlinenoexcept

Resolves addr to its nearest preceding symbol/image via dladdr.

Parameters
addrAddress to resolve.
out_rawReceives the raw resolution result.
Returns
true when dladdr located at least an owning image.

◆ emit_formatted_int()

RELOCO_BEGIN_UNSAFE_CODE RELOCO_ALWAYS_INLINE void microfmt::detail::emit_formatted_int ( const sink &  out,
const char *  digits,
size_t  digits_len,
bool  is_negative,
microfmt::string_view  prefix,
uint8_t  width,
bool  zero_pad 
)
inlinenoexcept

◆ emit_piece_by_index()

template<typename StrProvider , size_t PieceIdx, typename... Args>
RELOCO_ALWAYS_INLINE void microfmt::detail::emit_piece_by_index ( const sink &  out,
const std::tuple< const Args &... > &  arg_tuple 
)
inlinenoexcept

◆ fallible_signal_handler()

void microfmt::detail::fallible_signal_handler ( int  sig,
siginfo_t *  ,
void *   
)
inlinenoexcept

◆ fallible_tls_get()

fault_recovery_context * microfmt::detail::fallible_tls_get ( )
inlinenoexcept

Unwraps fallible_tls::get()'s result to a plain pointer.

reloco::tls_provider<T *, Tag>::get() returns result<std::reference_wrapper<T *>> for every model with genuine addressable per-thread storage, or result<T *> by value for RELOCO_TLS_MODEL_PTHREAD's bit-packed-pointer specialization (see tls_provider.hpp's file-level docs); this unwraps either shape to a plain pointer, and treats an outright tls_provider::get() failure the same as "no fallible operation active/nested" (nullptr), matching this slot's un-set default.

◆ fallible_tls_set()

bool microfmt::detail::fallible_tls_set ( fault_recovery_context *  ctx)
inlinenoexcept

Sets the calling thread's recovery-context slot; returns false if the underlying tls_provider::set() itself failed (surfaced to callers the same way a fault during the guarded copy is).

◆ format_boost_address_v4()

void microfmt::detail::format_boost_address_v4 ( const boost::asio::ip::address_v4 &  address,
const sink &  out 
)
inlinenoexcept

◆ format_boost_address_v6()

void microfmt::detail::format_boost_address_v6 ( const boost::asio::ip::address_v6 &  address,
const sink &  out 
)
inlinenoexcept

◆ format_boost_date()

void microfmt::detail::format_boost_date ( const boost::gregorian::date &  date,
const sink &  out 
)
inlinenoexcept

◆ format_boost_time_duration()

void microfmt::detail::format_boost_time_duration ( const boost::posix_time::time_duration &  duration,
const sink &  out 
)
inlinenoexcept

◆ format_dec_backward()

template<typename UInt >
RELOCO_ALWAYS_INLINE RELOCO_UNSAFE_BUFFER_USAGE RELOCO_CONSTEXPR20 char * microfmt::detail::format_dec_backward ( char *  ptr,
UInt  value 
)
inlinenoexcept

◆ format_float_via_printf()

template<typename T >
RELOCO_BEGIN_UNSAFE_CODE RELOCO_UNSAFE_BUFFER_USAGE void microfmt::detail::format_float_via_printf ( T  val,
const parsed_float_spec &  spec,
const sink &  out 
)
inlinenoexcept

Formats a floating-point value via snprintf into the given sink.

Falls back to a heap allocation only when the fixed stack buffer proves too small for extreme precisions.

Template Parameters
TFloating type being formatted.
Parameters
valThe value to format.
specParsed format specifier.
outDestination sink.

◆ format_hex_backward()

template<typename UInt >
RELOCO_UNSAFE_BUFFER_USAGE RELOCO_ALWAYS_INLINE RELOCO_CONSTEXPR20 char * microfmt::detail::format_hex_backward ( char *  ptr,
UInt  value,
bool  uppercase 
)
inlinenoexcept

◆ format_reloco_map()

template<typename KeyFormatter , typename ValueFormatter , typename Range >
void microfmt::detail::format_reloco_map ( const KeyFormatter &  key_formatter,
const ValueFormatter &  value_formatter,
const Range &  range,
const sink &  out 
)
noexcept

◆ format_reloco_sequence()

template<typename Formatter , typename Range >
void microfmt::detail::format_reloco_sequence ( const Formatter &  elem_formatter,
const Range &  range,
const sink &  out 
)
noexcept

◆ format_remote_vector_element()

template<typename T >
bool microfmt::detail::format_remote_vector_element ( address_space_ref  space,
span< std::byte >  scratch,
uintptr_t  element_addr,
const sink &  out 
)
noexcept

◆ format_tuple_impl()

template<typename Tuple , size_t... Is>
void microfmt::detail::format_tuple_impl ( const Tuple &  t,
const sink &  out,
microfmt::string_view  sep,
microfmt::string_view  spec,
std::index_sequence< Is... >   
)
noexcept

◆ format_type_thunk()

template<typename T >
RELOCO_BEGIN_UNSAFE_CODE void microfmt::detail::format_type_thunk ( const void *  val_ptr,
microfmt::string_view  spec,
const sink &  out 
)
inlinenoexcept

◆ format_uuid_bytes()

MICROFMT_API void microfmt::detail::format_uuid_bytes ( const sink &  out,
span< const uint8_t >  bytes,
bool  is_upper,
bool  is_braced 
)
noexcept

◆ get_arg_by_index()

template<size_t TargetIdx, size_t CurIdx, typename T , typename... Rest>
RELOCO_BEGIN_UNSAFE_CODE RELOCO_ALWAYS_INLINE const void * microfmt::detail::get_arg_by_index ( const T &  first,
const Rest &...  rest 
)
inlinenoexcept

◆ install_fallible_handlers()

bool microfmt::detail::install_fallible_handlers ( )
inlinenoexcept

◆ parse_advanced_string_spec()

RELOCO_BEGIN_UNSAFE_CODE constexpr parsed_string_spec microfmt::detail::parse_advanced_string_spec ( microfmt::string_view  spec)
inlineconstexprnoexcept

Parses an advanced string specifier: [[fill]align][width][.precision][?].

Parameters
specRaw specifier text.
Returns
Parsed parsed_string_spec.

◆ parse_float_spec()

constexpr parsed_float_spec microfmt::detail::parse_float_spec ( microfmt::string_view  spec)
inlineconstexprnoexcept

Parses a floating-point format specifier string.

Parameters
specRaw specifier text (e.g. "+#.4e").
Returns
Parsed parsed_float_spec describing the requested formatting.

◆ parse_positional_index()

RELOCO_BEGIN_UNSAFE_CODE constexpr bool microfmt::detail::parse_positional_index ( microfmt::string_view  text,
size_t &  index 
)
constexprnoexcept

◆ sbintime_frac_to_decimal()

uint32_t microfmt::detail::sbintime_frac_to_decimal ( uint32_t  frac32,
time_precision  prec 
)
inlinenoexcept

Converts an sbintime_t fractional part into decimal-scaling digits.

Parameters
frac32Fractional seconds expressed in 2^-32 units.
precTarget decimal precision.
Returns
Decimal-scaled fractional value.

◆ starts_with() [1/2]

constexpr bool microfmt::detail::starts_with ( microfmt::string_view  sv,
char  c 
)
constexprnoexcept

◆ starts_with() [2/2]

constexpr bool microfmt::detail::starts_with ( microfmt::string_view  sv,
microfmt::string_view  prefix 
)
constexprnoexcept

◆ ucontext_read_register()

bool microfmt::detail::ucontext_read_register ( const void *  ctx,
address_space_ref  ,
uint32_t  dwarf_reg_index,
void *  out_value,
size_t  value_size 
)
inlinenoexcept

Reads a general-purpose register out of a POSIX ucontext_t by its DWARF register index (see microfmt::dwarf).

Supports Linux and FreeBSD across x86, x86_64, ARM, AArch64, and RISC-V. out_value may be any size from 1 up to sizeof(uint64_t) bytes: the full register value is always read into a 64-bit temporary first, then only the low value_size bytes are copied out, so 32-bit-register architectures (x86, ARM32, RISC-V32) can be read with a native-width uint32_t (or narrower) destination without truncation surprises on little-endian targets. Unsupported register indices, architectures/OSes, or an oversized value_size return false without touching out_value.

◆ ucontext_write_register()

bool microfmt::detail::ucontext_write_register ( void *  ctx,
address_space_ref  ,
uint32_t  dwarf_reg_index,
const void *  in_value,
size_t  value_size 
)
inlinenoexcept

Writes a general-purpose register into a POSIX ucontext_t by its DWARF register index (see microfmt::dwarf).

Mirrors ucontext_read_register; supports the same architectures and OSes. in_value may be any size from 1 up to sizeof(uint64_t) bytes: the bytes are copied into the low bits of a zero-initialized 64-bit temporary before truncating to the target register's native width, so 32-bit-register architectures can be written from a native-width uint32_t (or narrower) source. Unsupported register indices, architectures/OSes, or an oversized value_size return false without modifying ctx.

◆ unrolled_format_impl()

template<typename StrProvider , typename... Args, size_t... Is>
RELOCO_ALWAYS_INLINE void microfmt::detail::unrolled_format_impl ( const sink &  out,
std::index_sequence< Is... >  ,
const Args &...  args 
)
inlinenoexcept

◆ write_errno_string()

RELOCO_BEGIN_UNSAFE_CODE void microfmt::detail::write_errno_string ( const sink &  out,
int  value 
)
inlinenoexcept

◆ write_escaped_character()

void microfmt::detail::write_escaped_character ( const sink &  out,
char  ch 
)
inlinenoexcept

Writes a single character with C-style debug escaping.

Parameters
outDestination sink.
chCharacter to escape and emit.

◆ write_fill_chars()

RELOCO_END_UNSAFE_CODE void microfmt::detail::write_fill_chars ( const sink &  out,
char  fill,
size_t  count 
)
inlinenoexcept

Writes count copies of fill to the sink in bounded chunks.

Parameters
outDestination sink.
fillCharacter to emit.
countNumber of characters to emit.

Variable Documentation

◆ has_formatter_v

template<typename T >
constexpr bool microfmt::detail::has_formatter_v = has_formatter<T>::value
inlineconstexpr

◆ is_hashable_v

template<typename T >
constexpr bool microfmt::detail::is_hashable_v = is_hashable<T>::value
inlineconstexpr

Convenience variable template for is_hashable.

Template Parameters
TCandidate hashed type.