Global namespace

Namespaces

Name
fmt

fmt namespace

Namespaces

Name
enums
safe_duration_cast

Types

Name Description
basic_appender
basic_cstring_view A reference to a null-terminated string. It can be constructed from a C string or std::string.
basic_format_arg
basic_format_args 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 vformat:
basic_fstring
basic_memory_buffer A dynamically growing memory buffer for trivially copyable/constructible types with the first SIZE elements stored in the object itself. Most commonly used via the memory_buffer alias for char.
basic_ostream_formatter
basic_printf_context
basic_specs
basic_string_view An implementation of std::basic_string_view for pre-C++17. It provides a subset of the API. fmt::basic_string_view is used for format strings even if std::basic_string_view is available to prevent issues when a library is compiled with a different -std option than the client code (which is not recommended).
buffered_file
bytes
compiled_string
conjunction
conjunction<P>
conjunction<P1, Pn...>
context
day
dynamic_format_arg_store A dynamic list of formatting arguments with storage.
file
format_error An error reported from a formatting function.
format_facet
format_facet<locale>
format_int A fast integer formatter.
format_specs
format_to_n_result
format_to_result
formatter
formatter</* implementation-defined */>
formatter<bytes>
formatter<std::error_code>
formatter<std::source_location>
formatter<std::type_info>
formatter<group_digits_view<T>>
formatter<T, char>
formatter<std::atomic_flag, Char>
formatter<std::byte, Char>
formatter<day, Char>
formatter</* implementation-defined */, Char>
formatter<std::thread::id, Char>
formatter<std::monostate, Char>
formatter<month, Char>
formatter<std::nullptr_t, Char>
formatter<std::filesystem::path, Char>
formatter<tm, Char>
formatter<weekday, Char>
formatter<year, Char>
formatter<year_month_day, Char>
formatter</* implementation-defined */, Char>
formatter<signed char, Char>
formatter<unsigned char, Char>
formatter<short, Char>
formatter<unsigned short, Char>
formatter<long, Char>
formatter<unsigned long, Char>
formatter<Char*, Char>
formatter<void*, Char>
formatter<BitRef, Char>
formatter<R, Char>
formatter<R, Char>
formatter<R, Char>
formatter<T, Char>
formatter<T, Char>
formatter<Tuple, Char>
formatter<Variant, Char>
formatter<std::atomic<T>, Char>
formatter<std::bitset<N>, Char>
formatter<std::complex<T>, Char>
formatter<local_time<Duration>, Char>
formatter<nested_view<T, Char>, Char>
formatter<std::optional<T>, Char>
formatter<std::reference_wrapper<T>, Char>
formatter</* implementation-defined */, Char>
formatter</* implementation-defined */, Char>
formatter<sys_time<Duration>, Char>
formatter<tuple_join_view<Tuple, Char>, Char>
formatter</* implementation-defined */, Char>
formatter<utc_time<Duration>, Char>
formatter<Char[], Char>
formatter<std::basic_string<Char, Traits, Allocator>, Char>
formatter<std::chrono::duration<Rep, Period>, Char>
formatter<std::expected<T, E>, Char>
formatter<join_view<It, Sentinel, Char>, Char>
formatter<T, Char, void_t</* implementation-defined */>>
fstring A compile-time format string. Use format_string in the public API to prevent type deduction.
generic_context
group_digits_view
is_compiled_string
is_contiguous
is_contiguous<basic_memory_buffer<T, SIZE, Allocator>>
is_contiguous<std::basic_string<Char, Traits, Allocator>>
is_range
is_tuple_formattable
is_tuple_like
is_variant_like
join_view
loc_value
locale_ref
monostate
month
nested_formatter
nested_view
parse_context Parsing context consisting of a format string range being parsed and an argument counter for automatic indexing.
parse_context<char>
path
range_format_kind
range_formatter
range_formatter<T, Char>
rgb
runtime_format_string
static_format_result
string_buffer
text_style A text style consisting of foreground and background colors and emphasis.
tuple_join_view
vprintf_args
weekday
writer
year
year_month_day
appender
basic_format_context
basic_format_parse_context
basic_format_string
bool_constant
buffered_context
conditional_t
cstring_view
decay_t
enable_if_t
format_args
format_context
format_parse_context
format_string
is_formattable
local_time
make_unsigned_t
memory_buffer
nullptr_t
ostream_formatter
printf_args
printf_context
remove_const_t
remove_cvref_t
remove_reference_t
string_view
sys_time
underlying_t
utc_time
vargs
void_t
wcstring_view
wformat_args
wformat_context
wformat_parse_context
wformat_string
wmemory_buffer
wprintf_args
wprintf_context
wstring_view

Enums

Name
Unnamed enum
align
arg_id_kind
color
emphasis
presentation_type
range_format
sign
terminal_color

Functions

Name Description
Unnamed overloads
arg Returns a named argument to be used in a formatting function. It should only be used in a call to a formatting function.
assert_fail
bg Creates a text style from the background color.
fg Creates a text style from the foreground (text) color.
format format overloads
format_system_error 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 out. The format is the same as the one used by std::system_error(ec, message) where ec is std::error_code(error_code, std::generic_category()). It is implementation-defined but normally looks like:
format_to format_to overloads
format_to_n Formats args according to specifications in fmt, writes up to n characters of the result to the output iterator out and returns the total (not truncated) output size and the iterator past the end of the output range. format_to_n does not append a terminating null character.
formatted_size Returns the number of chars in the output of format(fmt, args...).
fprintf Formats args according to specifications in fmt and writes the output to f.
gmtime Converts given time since epoch as std::time_t value into calendar time, expressed in Coordinated Universal Time (UTC). Unlike std::gmtime, this function is thread-safe on most platforms.
group_digits Returns a view that formats an integer value using ',' as a locale-independent thousands separator.
join join overloads
make_format_args
make_printf_args Constructs an format_arg_store object that contains references to arguments and can be implicitly converted to printf_args.
make_wformat_args
max_of
min_of
operator| Bitwise disjunction operators
print print overloads
printf Formats args according to specifications in fmt and writes the output to stdout.
println println overloads
ptr Converts p to const void for pointer formatting.
report_error Reports a format error at compile time or, via a format_error exception, at runtime.
report_system_error
runtime Creates a runtime format string.
sprintf Formats args according to specifications in fmt and returns the result as as string.
streamed Returns a view that formats value via an ostream operator<<.
styled Returns an argument that will be formatted using ANSI escape sequences, to be used in a formatting function.
system_category
system_error Constructs std::system_error with a message formatted with fmt::format(fmt, args...). error_code is a system error code as given by errno.
to_string Converts value to std::string using the default format for type T.
to_wstring Converts value to std::wstring using the default format for type T.
underlying Converts e to the underlying type.
vformat
vformat_to vformat_to overloads
vformat_to_n
vfprintf
vprint
vprint_buffered
vprintln
vsprintf
vsystem_error
operator== Equality operator
operator!= Inequality operator
operator< Less-than operator
operator<= Less-than-or-equal operator
operator> Greater-than operator
operator>= Greater-than-or-equal operator

Concepts

Name
formattable

fmt::enums namespace

Functions

Name
format_as

fmt::safe_duration_cast namespace

Functions

Name Description
lossless_integral_conversion Converts From to To, without loss. If the dynamic value of from can't be converted to To without loss, ec is set.
safe_duration_cast Safe duration_cast between floating point durations
safe_float_conversion converts From to To if possible, otherwise ec is set.

Created with MrDocs