microfmt
Zero-allocation C++ formatting for constrained environments
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
microfmt::formatter< hash_view< T > > Struct Template Reference

Formatter for hash_view. More...

#include <hash.hpp>

Collaboration diagram for microfmt::formatter< hash_view< T > >:
Collaboration graph
[legend]

Public Member Functions

constexpr void parse (format_parse_context &ctx) noexcept
 Parses the specifier for the wrapped integer formatter.
 
void format (const hash_view< T > &view, const sink &out) const noexcept
 Computes and renders the hash value.
 

Public Attributes

formatter< std::size_t > int_fmt_ {}
 Underlying formatter for the computed hash value.
 

Detailed Description

template<typename T>
struct microfmt::formatter< hash_view< T > >

Formatter for hash_view.

Forwards any format specifier to the wrapped std::size_t formatter.

Template Parameters
THolds the wrapped integral hash type (kept as the view template parameter).

Member Function Documentation

◆ format()

template<typename T >
void microfmt::formatter< hash_view< T > >::format ( const hash_view< T > &  view,
const sink &  out 
) const
inlinenoexcept

Computes and renders the hash value.

Parameters
viewThe hash view to format.
outDestination sink.

◆ parse()

template<typename T >
constexpr void microfmt::formatter< hash_view< T > >::parse ( format_parse_context &  ctx)
inlineconstexprnoexcept

Parses the specifier for the wrapped integer formatter.

Parameters
ctxFormat parse context exposing the specifier text.

Member Data Documentation

◆ int_fmt_

template<typename T >
formatter<std::size_t> microfmt::formatter< hash_view< T > >::int_fmt_ {}

Underlying formatter for the computed hash value.


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