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

Formatter for float values using printf-compatible presentation. More...

#include <floating.hpp>

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

Public Member Functions

constexpr void parse (format_parse_context &ctx) noexcept
 Parses the floating-point format specifier.
 
void format (float val, const sink &out) const noexcept
 Renders a float value.
 

Public Attributes

detail::parsed_float_spec spec_ {}
 Parsed state carried from parse to format.
 

Detailed Description

Formatter for float values using printf-compatible presentation.

Member Function Documentation

◆ format()

void microfmt::formatter< float >::format ( float  val,
const sink &  out 
) const
inlinenoexcept

Renders a float value.

Parameters
valValue to format.
outDestination sink.

◆ parse()

constexpr void microfmt::formatter< float >::parse ( format_parse_context &  ctx)
inlineconstexprnoexcept

Parses the floating-point format specifier.

Parameters
ctxFormat parse context exposing the specifier text.

Member Data Documentation

◆ spec_

Parsed state carried from parse to format.


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