fixed_point128 1.0.1.0
128 bit integer, fixed point and floating point arithmetic for C++20
Loading...
Searching...
No Matches
std::formatter< fp128::float128, char > Struct Reference

std::format support for fp128::float128. More...

#include <float128.h>

Public Member Functions

constexpr auto parse (basic_format_parse_context< char > &context)
template<typename FormatContext>
auto format (const fp128::float128 &value, FormatContext &context) const
string render (const fp128::float128 &value) const
 Builds the text, including the padding the specification asks for.

Public Attributes

char fill = ' '
 Character the padding is made of.
char align = 0
 One of < > ^, or zero when none was given.
char sign = '-'
 One of + - space.
char type = 0
 One of a A e E f F g G, or zero for the shortest form.
bool alternate = false
 The # flag: keep the point and the trailing zeros.
bool zero_pad = false
 The 0 flag: pad with zeros after the sign.
int width = 0
 Minimum field width.
int precision = -1
 Digits after the point, or -1 when none was given.

Detailed Description

std::format support for fp128::float128.

Accepts the whole floating point format specification: fill and alignment, a sign, the alternate form, zero padding, a width, a precision, and any of the a, A, e, E, f, F, g and G types. An empty specification gives the shortest text that reads back as the same value, which is what std::format produces for a double.

A width or precision given as a nested replacement field is not supported; both have to be written out as digits.

Definition at line 7883 of file float128.h.

Member Function Documentation

◆ parse()

auto std::formatter< fp128::float128, char >::parse ( basic_format_parse_context< char > & context)
inlineconstexpr

Definition at line 7885 of file float128.h.

◆ format()

template<typename FormatContext>
auto std::formatter< fp128::float128, char >::format ( const fp128::float128 & value,
FormatContext & context ) const
inline

Definition at line 7953 of file float128.h.

◆ render()

string std::formatter< fp128::float128, char >::render ( const fp128::float128 & value) const
inlinenodiscard

Builds the text, including the padding the specification asks for.

Definition at line 7960 of file float128.h.

Member Data Documentation

◆ fill

char std::formatter< fp128::float128, char >::fill = ' '

Character the padding is made of.

Definition at line 7995 of file float128.h.

◆ align

char std::formatter< fp128::float128, char >::align = 0

One of < > ^, or zero when none was given.

Definition at line 7996 of file float128.h.

◆ sign

char std::formatter< fp128::float128, char >::sign = '-'

One of + - space.

Definition at line 7997 of file float128.h.

◆ type

char std::formatter< fp128::float128, char >::type = 0

One of a A e E f F g G, or zero for the shortest form.

Definition at line 7998 of file float128.h.

◆ alternate

bool std::formatter< fp128::float128, char >::alternate = false

The # flag: keep the point and the trailing zeros.

Definition at line 7999 of file float128.h.

◆ zero_pad

bool std::formatter< fp128::float128, char >::zero_pad = false

The 0 flag: pad with zeros after the sign.

Definition at line 8000 of file float128.h.

◆ width

int std::formatter< fp128::float128, char >::width = 0

Minimum field width.

Definition at line 8001 of file float128.h.

◆ precision

int std::formatter< fp128::float128, char >::precision = -1

Digits after the point, or -1 when none was given.

Definition at line 8002 of file float128.h.


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