Top‐level namespace for the {fmt} formatting library, wrapping all public API in the inline namespace v12 used to version the library's ABI.
Namespaces
Name |
Description |
Contains |
|
Helpers for converting between |
Types
Name |
Description |
An output iterator that appends to a buffer. It is used instead of |
|
A reference to a null‐terminated string. It can be constructed from a C string or |
|
A formatting argument. |
|
A view of a collection of formatting arguments. To avoid lifetime issues it should only be used as a parameter type in type‐erased functions such as |
|
A |
|
A dynamically growing memory buffer for trivially copyable/constructible types with the first |
|
Formats an object of type T that has an overloaded ostream operator<<. |
|
The formatting context used to evaluate |
|
Basic format specifiers for built‐in and string types. |
|
An implementation of |
|
A buffered file. |
|
A view over a |
|
A compile‐time string which is compiled into fast formatting code. |
|
Logical AND of a list of traits, each exposing a |
|
A formatting context. |
|
A dynamic list of formatting arguments with storage. |
|
A file. A closed file is represented by a file object with descriptor ‐1. Methods that are not declared with noexcept may throw |
|
An error reported from a formatting function. |
|
A locale facet that formats values in UTF‐8. It is parameterized on the locale to avoid the heavy <locale> include. |
|
A fast integer formatter. |
|
Format specifiers for built‐in and string types. |
|
The result of |
|
The result of |
|
A formatter for objects of type |
|
A compile‐time format string. Use |
|
The format context implementation used for output iterators other than |
|
A view holding an integer value to be formatted with digit grouping. |
|
A trait that detects whether |
|
Specifies if |
|
Detects whether |
|
Detects whether |
|
Detects whether every element of tuple‐like type |
|
Detects whether |
|
Detects whether |
|
A view over the iterator range |
|
A type‐erased formatting argument passed to a |
|
A type‐erased reference to std::locale to avoid the heavy <locale> include. |
|
Detects whether formatting an object of type |
|
An empty placeholder type used where a value is required by the API but carries no information, e.g. as the mapped type for arguments that don't match any supported formatting type. |
|
Base class for formatters that nest another formatter and support applying a width and alignment to its overall output, such as |
|
Pairs a value with the formatter that should be used to format it, so it can be formatted through a |
|
Parsing context consisting of a format string range being parsed and an argument counter for automatic indexing. |
|
A |
|
Determines the |
|
Formats a range as a bracketed, separator‐delimited sequence of its elements. |
|
A color represented as separate red, green, and blue components. |
|
A format string that skips compile‐time checks and is validated at runtime instead, as returned by |
|
Holds a null‐terminated string of exactly |
|
A |
|
A text style consisting of foreground and background colors and emphasis. |
|
A view over |
|
A helper that maps a character type to the type‐erased argument list used with |
|
A writer to a buffered stream. It doesn't own the underlying stream. |
Type Aliases
Name |
Description |
A |
|
Format context type for a given output iterator and character type, resolving to |
|
Alias of |
|
A format string for character type |
|
Alias for |
|
Format context type used by |
|
Alias for |
|
A |
|
Alias for |
|
Alias for |
|
Alias of |
|
Alias of |
|
Alias of |
|
A format string that is validated at compile time. |
|
A trait indicating whether |
|
A time point on the local clock, with the given |
|
Alias for |
|
A memory buffer for |
|
An argument bound to a name, as returned by |
|
The type of the |
|
A |
|
The type‐erased argument list used with |
|
A |
|
Alias for |
|
Alias for |
|
Alias for |
|
A |
|
A time point on the system clock, with the given |
|
Alias for |
|
Alias for |
|
A time point on the UTC clock, with the given |
|
The type returned by |
|
Alias that maps any set of types to |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
The type‐erased argument list used with |
|
A |
|
A |
|
Enums
Name |
Description |
The number of characters to store in the basic_memory_buffer object itself to avoid dynamic memory allocation. |
|
The alignment of a formatted value within its field width. |
|
The kind of dynamic argument, if any, used to supply a field width or precision. |
|
A named color from the extended CSS/X11 color set, encoded as a packed 0xRRGGBB value. |
|
A bitmask of text emphasis styles that can be combined with |
|
The presentation type of a format specifier, encoding which of the mutually exclusive type letters (e.g. 'd', 'x', 'f', 's') was used. Enumerators for unrelated categories (integral/character, string/pointer, floating‐point) intentionally share numeric values because at most one category applies to a given argument type. |
|
The style used to format a range or range‐like type. |
|
The sign specifier controlling how the sign of a numeric value is formatted. |
|
Terminal colors that map to the standard ANSI SGR foreground color codes. |
Functions
Name |
Description |
|
|
|
Reports an assertion failure, used by the |
Creates a text style from the background color. |
|
Creates a text style from the foreground (text) color. |
|
|
|
Formats an error message for an error returned by an operating system or a language runtime, for example a file opening error, and writes it to |
|
|
|
|
|
|
|
|
|
|
|
Returns a view that formats an integer value using ',' as a locale‐independent thousands separator. |
|
|
|
Constructs an object that stores references to arguments and can be implicitly converted to |
|
Constructs an |
|
A |
|
Returns the larger of |
|
Returns the smaller of |
|
User‐defined literal equivalent of |
|
Converts a string literal into a format string that will be parsed at compile time and converted into efficient formatting code. Requires support for class types in constant template parameters (a C++20 feature). |
|
Bitwise disjunction operators |
|
|
|
Formats |
|
|
|
|
|
|
Reports a format error at compile time or, via a |
Reports a system error without throwing an exception. Can be used to report errors from destructors. |
|
|
|
|
|
Returns a view that formats |
|
Returns an argument that will be formatted using ANSI escape sequences, to be used in a formatting function. |
|
Returns the system error category used to construct |
|
Constructs |
|
|
|
Converts |
|
Converts |
|
|
|
|
|
|
|
Formats |
|
|
|
Formats |
|
|
|
Formats |
|
Constructs |
|
|
|
|
|
|
|
|
|
|
|
|
Concepts
Name |
Description |
A concept satisfied by types that can be formatted with character type |
Created with MrDocs