microfmt
Zero-allocation C++ formatting for constrained environments
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
floating.hpp File Reference

Floating-point formatting backed by printf-style specifiers. More...

#include "../microfmt.hpp"
#include <cstddef>
#include <cstdio>
#include <string_view>
#include <type_traits>
Include dependency graph for floating.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  microfmt::detail::parsed_float_spec
 Parsed floating-point format specifier state. More...
 
struct  microfmt::formatter< float >
 Formatter for float values using printf-compatible presentation. More...
 
struct  microfmt::formatter< double >
 Formatter for double values using printf-compatible presentation. More...
 
struct  microfmt::formatter< long double >
 Formatter for long double values using printf-compatible presentation. More...
 

Namespaces

namespace  microfmt
 
namespace  microfmt::detail
 

Functions

constexpr parsed_float_spec microfmt::detail::parse_float_spec (microfmt::string_view spec) noexcept
 Parses a floating-point format specifier string.
 
template<typename T >
RELOCO_UNSAFE_BUFFER_USAGE size_t microfmt::detail::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 microfmt::detail::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.
 

Detailed Description

Floating-point formatting backed by printf-style specifiers.