Namespaces
Name |
fmt namespace
Namespaces
Name |
Types
Name |
Description |
A reference to a null‐terminated string. It can be constructed from a C string or |
|
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 dynamically growing memory buffer for trivially copyable/constructible types with the first |
|
An implementation of |
|
A dynamic list of formatting arguments with storage. |
|
An error reported from a formatting function. |
|
A fast integer formatter. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A compile‐time format string. Use |
|
|
|
|
|
Parsing context consisting of a format string range being parsed and an argument counter for automatic indexing. |
|
A text style consisting of foreground and background colors and emphasis. |
|
Enums
Name |
Functions
Name |
Description |
Returns a named argument to be used in a formatting function. It should only be used in a call to a formatting function. |
|
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 |
|
|
|
Formats |
|
Returns the number of chars in the output of |
|
Formats |
|
Converts given time since epoch as |
|
Returns a view that formats an integer value using ',' as a locale‐independent thousands separator. |
|
|
|
Constructs an |
|
Bitwise disjunction operators |
|
|
|
Formats |
|
|
|
Converts |
|
Reports a format error at compile time or, via a |
|
Creates a runtime format string. |
|
Formats |
|
Returns a view that formats |
|
Returns an argument that will be formatted using ANSI escape sequences, to be used in a formatting function. |
|
Constructs |
|
Converts |
|
Converts |
|
Converts |
|
|
|
Equality operator |
|
Inequality operator |
|
Less‐than operator |
|
Less‐than‐or‐equal operator |
|
Greater‐than operator |
|
Greater‐than‐or‐equal operator |
Concepts
Name |
fmt::enums namespace
Functions
Name |
fmt::safe_duration_cast namespace
Functions
Name |
Description |
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 between floating point durations |
|
converts From to To if possible, otherwise ec is set. |
Namespaces
Types
Name |
Description |
A reference to a null‐terminated string. It can be constructed from a C string or |
|
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 dynamically growing memory buffer for trivially copyable/constructible types with the first |
|
An implementation of |
|
A dynamic list of formatting arguments with storage. |
|
An error reported from a formatting function. |
|
A fast integer formatter. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A compile‐time format string. Use |
|
|
|
|
|
Parsing context consisting of a format string range being parsed and an argument counter for automatic indexing. |
|
A text style consisting of foreground and background colors and emphasis. |
|
Enums
Functions
Name |
Description |
Returns a named argument to be used in a formatting function. It should only be used in a call to a formatting function. |
|
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 |
|
|
|
Formats |
|
Returns the number of chars in the output of |
|
Formats |
|
Converts given time since epoch as |
|
Returns a view that formats an integer value using ',' as a locale‐independent thousands separator. |
|
|
|
Constructs an |
|
Bitwise disjunction operators |
|
|
|
Formats |
|
|
|
Converts |
|
Reports a format error at compile time or, via a |
|
Creates a runtime format string. |
|
Formats |
|
Returns a view that formats |
|
Returns an argument that will be formatted using ANSI escape sequences, to be used in a formatting function. |
|
Constructs |
|
Converts |
|
Converts |
|
Converts |
|
|
|
Equality operator |
|
Inequality operator |
|
Less‐than operator |
|
Less‐than‐or‐equal operator |
|
Greater‐than operator |
|
Greater‐than‐or‐equal operator |
Concepts
Name |
Functions
Name |
Synopsis
Declared in <fmt/format.h>
template<typename Enum>
constexpr
underlying_t<Enum>
format_as(Enum e) noexcept;
Functions
Name |
Description |
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 between floating point durations |
|
converts From to To if possible, otherwise ec is set. |
Converts From to To, without loss. If the dynamic value of from can't be converted to To without loss, ec is set.
Synopses
Declared in <fmt/chrono.h>
template<
typename To,
typename From>
constexpr
To
lossless_integral_conversion(
From const from,
int& ec);
Converts From to To, without loss. If the dynamic value of from can't be converted to To without loss, ec is set.
template<
typename To,
typename From>
constexpr
To
lossless_integral_conversion(
From const from,
int& ec);
template<
typename To,
typename From>
constexpr
To
lossless_integral_conversion(
From const from,
int& ec);
Synopsis
Declared in <fmt/chrono.h>
template<
typename To,
typename From>
constexpr
To
lossless_integral_conversion(
From const from,
int& ec);
Converts From to To, without loss. If the dynamic value of from can't be converted to To without loss, ec is set.
Synopsis
Declared in <fmt/chrono.h>
template<
typename To,
typename From>
constexpr
To
lossless_integral_conversion(
From const from,
int& ec);
Synopsis
Declared in <fmt/chrono.h>
template<
typename To,
typename From>
constexpr
To
lossless_integral_conversion(
From const from,
int& ec);
Safe duration_cast between floating point durations
Synopsis
Declared in <fmt/chrono.h>
template<
typename To,
typename FromRep,
typename FromPeriod>
To
safe_duration_cast(
std::chrono::duration<FromRep, FromPeriod> from,
int& ec);
converts From to To if possible, otherwise ec is set.
Synopses
Declared in <fmt/chrono.h>
converts From to To if possible, otherwise ec is set.
template<
typename To,
typename From>
constexpr
To
safe_float_conversion(
From const from,
int& ec);
template<
typename To,
typename From>
constexpr
To
safe_float_conversion(
From const from,
int& ec);
converts From to To if possible, otherwise ec is set.
Synopsis
Declared in <fmt/chrono.h>
template<
typename To,
typename From>
constexpr
To
safe_float_conversion(
From const from,
int& ec);
Description
input | output ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐|‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ NaN | NaN Inf | Inf normal, fits in output | converted (possibly lossy) normal, does not fit in output | ec is set subnormal | best effort ‐Inf | ‐Inf
Synopsis
Declared in <fmt/chrono.h>
template<
typename To,
typename From>
constexpr
To
safe_float_conversion(
From const from,
int& ec);
Synopsis
Declared in <fmt/base.h>
using appender = basic_appender<char>;
Synopsis
Declared in <fmt/base.h>
template<
typename OutputIt,
typename Char>
using basic_format_context = conditional_t<std::is_same<OutputIt, appender>::value, context, generic_context<OutputIt, Char>>;
Synopsis
Declared in <fmt/base.h>
template<typename Char>
using basic_format_parse_context = parse_context<Char>;
Synopsis
Declared in <fmt/xchar.h>
template<
typename Char,
typename... T>
using basic_format_string = basic_fstring<Char, T...>;
Synopsis
Declared in <fmt/base.h>
template<bool B>
using bool_constant = std::integral_constant<bool, B>;
Synopsis
Declared in <fmt/base.h>
template<typename Char>
using buffered_context = conditional_t<std::is_same<Char, char>::value, context, generic_context<basic_appender<Char>, Char>>;
Synopsis
Declared in <fmt/base.h>
template<
bool B,
typename T,
typename F>
using conditional_t = std::conditional<B, T, F>::type;
Synopsis
Declared in <fmt/os.h>
using cstring_view = basic_cstring_view<char>;
Synopsis
Declared in <fmt/base.h>
template<typename T>
using decay_t = std::decay<T>::type;
Synopsis
Declared in <fmt/base.h>
template<
bool B,
typename T = void>
using enable_if_t = T;
Synopsis
Declared in <fmt/base.h>
using format_args = basic_format_args<context>;
Synopsis
Declared in <fmt/base.h>
using format_context = context;
Synopsis
Declared in <fmt/base.h>
using format_parse_context = parse_context<char>;
Synopsis
Declared in <fmt/base.h>
template<typename... T>
using format_string = fstring<T...>::t;
Synopsis
Declared in <fmt/base.h>
template<
typename T,
typename Char = char>
using is_formattable = bool_constant<!std::is_same<detail::mapped_t<conditional_t<std::is_void<T>::value, int *, T>, Char>, void>::value>;
Synopsis
Declared in <fmt/chrono.h>
template<class Duration>
using local_time = std::chrono::time_point</* implementation-defined */, Duration>;
Synopsis
Declared in <fmt/base.h>
template<typename T>
using make_unsigned_t = std::make_unsigned<T>::type;
Synopsis
Declared in <fmt/format.h>
using memory_buffer = basic_memory_buffer<char>;
Synopsis
Declared in <fmt/base.h>
using nullptr_t = decltype(nullptr);
Synopsis
Declared in <fmt/ostream.h>
using ostream_formatter = basic_ostream_formatter<char>;
Synopsis
Declared in <fmt/printf.h>
using printf_args = basic_format_args<printf_context>;
Synopsis
Declared in <fmt/printf.h>
using printf_context = basic_printf_context<char>;
Synopsis
Declared in <fmt/base.h>
template<typename T>
using remove_const_t = std::remove_const<T>::type;
Synopsis
Declared in <fmt/base.h>
template<typename T>
using remove_cvref_t = std::remove_cv<remove_reference_t<T>>::type;
Synopsis
Declared in <fmt/base.h>
template<typename T>
using remove_reference_t = std::remove_reference<T>::type;
Synopsis
Declared in <fmt/base.h>
using string_view = basic_string_view<char>;
Synopsis
Declared in <fmt/chrono.h>
template<typename Duration>
using sys_time = std::chrono::time_point<std::chrono::system_clock, Duration>;
Synopsis
Declared in <fmt/base.h>
template<typename T>
using underlying_t = std::underlying_type<T>::type;
Synopsis
Declared in <fmt/chrono.h>
template<typename Duration>
using utc_time = std::chrono::time_point</* implementation-defined */, Duration>;
Synopsis
Declared in <fmt/base.h>
template<typename... T>
using vargs = /* implementation-defined */;
Synopsis
Declared in <fmt/base.h>
template<typename...>
using void_t = void;
Synopsis
Declared in <fmt/os.h>
using wcstring_view = basic_cstring_view<wchar_t>;
Synopsis
Declared in <fmt/xchar.h>
using wformat_args = basic_format_args<wformat_context>;
Synopsis
Declared in <fmt/xchar.h>
using wformat_context = buffered_context<wchar_t>;
Synopsis
Declared in <fmt/xchar.h>
using wformat_parse_context = parse_context<wchar_t>;
Synopsis
Declared in <fmt/xchar.h>
template<typename... T>
using wformat_string = basic_format_string<wchar_t, T...>::t;
Synopsis
Declared in <fmt/xchar.h>
using wmemory_buffer = basic_memory_buffer<wchar_t>;
Synopsis
Declared in <fmt/printf.h>
using wprintf_args = basic_format_args<wprintf_context>;
Synopsis
Declared in <fmt/printf.h>
using wprintf_context = basic_printf_context<wchar_t>;
Synopsis
Declared in <fmt/xchar.h>
using wstring_view = basic_string_view<wchar_t>;
Synopsis
Declared in <fmt/base.h>
template<typename T>
class basic_appender;
Types
Member Functions
Name |
Description |
|
Construct from |
Assignment operator |
|
Dereference operator |
|
Increment operators |
Protected Data Members
Name |
Synopsis
Declared in <fmt/base.h>
using container_type = /* implementation-defined */;
Construct from buffer
Synopsis
Declared in <fmt/base.h>
constexpr
basic_appender(/* implementation-defined */& buf);
Parameters
Name |
Description |
buf |
The object to copy construct from |
Assignment operator
Synopsis
Declared in <fmt/base.h>
constexpr
basic_appender&
operator=(T c);
Return Value
Reference to the current object
Parameters
Name |
Description |
c |
The object to assign from |
Dereference operator
Synopsis
Declared in <fmt/base.h>
constexpr
basic_appender&
operator*();
Return Value
Reference to the current object
Increment operators
Synopses
Declared in <fmt/base.h>
Increment operator
constexpr
basic_appender&
operator++();
Increment operator
constexpr
basic_appender
operator++(int);
Increment operator
Synopsis
Declared in <fmt/base.h>
constexpr
basic_appender&
operator++();
Return Value
Reference to the current object
Increment operator
Synopsis
Declared in <fmt/base.h>
constexpr
basic_appender
operator++(int);
Return Value
Another instance of the object
Synopsis
Declared in <fmt/base.h>
/* implementation-defined */* container;
A reference to a null‐terminated string. It can be constructed from a C string or std::string
.
Synopsis
Declared in <fmt/os.h>
template<typename Char>
class basic_cstring_view;
Member Functions
Name |
Description |
|
Constructors |
Returns the pointer to a C string. |
Description
You can use one of the following type aliases for common character types:
+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+ | Type | Definition | +=+===+ | cstring_view | basic_cstring_view<char> | +‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+ | wcstring_view | basic_cstring_view<wchar_t> | +‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+
This class is most useful as a parameter type for functions that wrap C APIs.
Constructors
Synopses
Declared in <fmt/os.h>
Constructs a string reference from an std::string
object.
basic_cstring_view(std::basic_string<Char> const& s);
Constructs a string reference object from a C string.
basic_cstring_view(Char const* s);
Constructs a string reference from an std::string
object.
Synopsis
Declared in <fmt/os.h>
basic_cstring_view(std::basic_string<Char> const& s);
Parameters
Name |
Description |
s |
The object to copy construct from |
Constructs a string reference object from a C string.
Synopsis
Declared in <fmt/os.h>
basic_cstring_view(Char const* s);
Parameters
Name |
Description |
s |
The object to construct from |
Returns the pointer to a C string.
Synopsis
Declared in <fmt/os.h>
Char const*
c_str() const;
Return Value
the pointer to a C string.
Synopsis
Declared in <fmt/base.h>
template<typename Context>
class basic_format_arg;
Types
Name |
Member Functions
Name |
Description |
|
Constructors |
Visits an argument dispatching to the appropriate visit method based on the argument type. For example, if the argument type is |
|
Conversion to |
Friends
Name |
Description |
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 |
Synopsis
Declared in <fmt/base.h>
class handle;
Member Functions
Synopsis
Declared in <fmt/base.h>
explicit
handle(/* implementation-defined */ custom);
Parameters
Name |
Description |
custom |
The object to construct from |
Synopsis
Declared in <fmt/base.h>
void
format(
parse_context<char_type>& parse_ctx,
Context& ctx) const;
Constructors
Synopses
Declared in <fmt/base.h>
Default constructor
constexpr
basic_format_arg();
Construct from T
template<typename T>
basic_format_arg(T&& val);
basic_format_arg(
/* implementation-defined */ const* args,
size_t size);
Default constructor
Synopsis
Declared in <fmt/base.h>
constexpr
basic_format_arg();
Construct from T
Synopsis
Declared in <fmt/base.h>
template<typename T>
basic_format_arg(T&& val);
Parameters
Name |
Description |
val |
The object to move construct from |
Synopsis
Declared in <fmt/base.h>
basic_format_arg(
/* implementation-defined */ const* args,
size_t size);
Synopsis
Declared in <fmt/base.h>
bool
format_custom(
char_type const* parse_begin,
parse_context<char_type>& parse_ctx,
Context& ctx);
Synopsis
Declared in <fmt/base.h>
/* implementation-defined */
type() const;
Visits an argument dispatching to the appropriate visit method based on the argument type. For example, if the argument type is double
then vis(value)
will be called with the value of type double
.
Synopsis
Declared in <fmt/base.h>
template<typename Visitor>
[[always_inline]]
constexpr
decltype(vis(0))
visit(Visitor&& vis) const;
Conversion to bool
Synopsis
Declared in <fmt/base.h>
constexpr
explicit
operator bool() const noexcept;
Return Value
The object converted to bool
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
:
Synopsis
Declared in <fmt/base.h>
template<typename Context>
class basic_format_args;
Types
Name |
Member Functions
Name |
Description |
|
Constructors |
Returns the argument with the specified id. |
|
Data Members
Name |
|
|
Description
void vlog(fmt::string_view fmt, fmt::format_args args); // OK fmt::format_args args = fmt::make_format_args(); // Dangling reference
Synopsis
Declared in <fmt/base.h>
using format_arg = basic_format_arg<Context>;
Constructors
Synopses
Declared in <fmt/base.h>
Default constructor
constexpr
basic_format_args();
Constructs a basic_format_args
object from format_arg_store
.
template<
int NUM_ARGS,
int NUM_NAMED_ARGS,
unsigned long long DESC>
[[always_inline]]
constexpr
basic_format_args(store<NUM_ARGS, NUM_NAMED_ARGS, DESC> const& s);
Construct from store
template<
int NUM_ARGS,
int NUM_NAMED_ARGS,
unsigned long long DESC>
constexpr
basic_format_args(store<NUM_ARGS, NUM_NAMED_ARGS, DESC> const& s);
Constructs a basic_format_args
object from a dynamic list of arguments.
constexpr
basic_format_args(
format_arg const* args,
int count,
bool has_named = false);
Default constructor
Synopsis
Declared in <fmt/base.h>
constexpr
basic_format_args();
Constructs a basic_format_args
object from format_arg_store
.
Synopsis
Declared in <fmt/base.h>
template<
int NUM_ARGS,
int NUM_NAMED_ARGS,
unsigned long long DESC>
[[always_inline]]
constexpr
basic_format_args(store<NUM_ARGS, NUM_NAMED_ARGS, DESC> const& s);
Parameters
Name |
Description |
s |
The object to copy construct from |
Construct from store
Synopsis
Declared in <fmt/base.h>
template<
int NUM_ARGS,
int NUM_NAMED_ARGS,
unsigned long long DESC>
constexpr
basic_format_args(store<NUM_ARGS, NUM_NAMED_ARGS, DESC> const& s);
Parameters
Name |
Description |
s |
The object to copy construct from |
Constructs a basic_format_args
object from a dynamic list of arguments.
Synopsis
Declared in <fmt/base.h>
constexpr
basic_format_args(
format_arg const* args,
int count,
bool has_named = false);
Parameters
Name |
Description |
args |
The object to construct from |
Returns the argument with the specified id.
Synopses
Declared in <fmt/base.h>
Returns the argument with the specified id.
constexpr
format_arg
get(int id) const;
template<typename Char>
format_arg
get(basic_string_view<Char> name) const;
Returns the argument with the specified id.
Synopsis
Declared in <fmt/base.h>
constexpr
format_arg
get(int id) const;
Return Value
the argument with the specified id.
Synopsis
Declared in <fmt/base.h>
template<typename Char>
format_arg
get(basic_string_view<Char> name) const;
Synopsis
Declared in <fmt/base.h>
template<typename Char>
constexpr
int
get_id(basic_string_view<Char> name) const;
Synopsis
Declared in <fmt/base.h>
int
max_size() const;
Synopsis
Declared in <fmt/base.h>
basic_format_arg<Context> const* args_;
Synopsis
Declared in <fmt/base.h>
/* implementation-defined */ const* values_;
Synopsis
Declared in <fmt/xchar.h>
template<
typename Char,
typename... T>
struct basic_fstring;
Types
Name |
Member Functions
Name |
Description |
|
Constructors |
Conversion to |
Synopsis
Synopses
Declared in <fmt/xchar.h>
Construct from runtime_format_string
Construct from S
template<typename S>
[[always_inline]]
basic_fstring(S const& value);
Construct from S
template<typename S>
[[always_inline]]
consteval
basic_fstring(S const& s);
Construct from runtime_format_string
Synopsis
Declared in <fmt/xchar.h>
basic_fstring(runtime_format_string<Char> fmt);
Parameters
Name |
Description |
fmt |
The object to construct from |
Construct from S
Synopsis
Declared in <fmt/xchar.h>
template<typename S>
[[always_inline]]
basic_fstring(S const& value);
Parameters
Name |
Description |
value |
The object to copy construct from |
Construct from S
Synopsis
Declared in <fmt/xchar.h>
template<typename S>
[[always_inline]]
consteval
basic_fstring(S const& s);
Parameters
Name |
Description |
s |
The object to copy construct from |
Synopsis
Declared in <fmt/xchar.h>
basic_string_view<Char>
get() const;
Conversion to basic_string_view
Synopsis
Declared in <fmt/xchar.h>
operator basic_string_view<Char>() const;
Return Value
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).
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
.
Synopsis
Declared in <fmt/format.h>
template<
typename T,
size_t SIZE = inline_buffer_size,
typename Allocator = /* implementation-defined */>
class basic_memory_buffer
: public /* implementation-defined */
Base Classes
Name |
Description |
|
A contiguous memory buffer with an optional growing ability. It is an internal class and shouldn't be used directly, only via |
Types
Member Functions
Name |
Description |
|
Constructs a |
|
Destructor |
Moves the content of the other |
|
Increases the buffer capacity to |
|
Resizes the buffer to contain |
Description
Example:
auto out = fmt::memory_buffer(); fmt::format_to(std::back_inserter(out), "The answer is {}.", 42);
This will append "The answer is 42." to out
. The buffer content can be converted to std::string
with to_string(out)
.
Synopsis
Declared in <fmt/format.h>
using const_reference = T const&;
Synopsis
Declared in <fmt/format.h>
using value_type = T;
Constructs a basic_memory_buffer
object moving the content of the other object to it.
Synopses
Declared in <fmt/format.h>
Constructs a basic_memory_buffer
object moving the content of the other object to it.
constexpr
basic_memory_buffer(basic_memory_buffer&& other) noexcept;
Construct from Allocator
constexpr
explicit
basic_memory_buffer(Allocator const& alloc = Allocator());
Constructs a basic_memory_buffer
object moving the content of the other object to it.
Synopsis
Declared in <fmt/format.h>
constexpr
basic_memory_buffer(basic_memory_buffer&& other) noexcept;
Parameters
Name |
Description |
other |
The object to move construct from |
Construct from Allocator
Synopsis
Declared in <fmt/format.h>
constexpr
explicit
basic_memory_buffer(Allocator const& alloc = Allocator());
Parameters
Name |
Description |
alloc |
The object to copy construct from |
Destructor
Synopsis
Declared in <fmt/format.h>
constexpr
~basic_memory_buffer();
Moves the content of the other basic_memory_buffer
object to this one.
Synopsis
Declared in <fmt/format.h>
basic_memory_buffer&
operator=(basic_memory_buffer&& other) noexcept;
Return Value
Reference to the current object
Parameters
Name |
Description |
other |
The object to move assign from |
Synopsis
Declared in <fmt/format.h>
template<typename ContiguousRange>
constexpr
void
append(ContiguousRange const& range);
Synopsis
Declared in <fmt/format.h>
Allocator
get_allocator() const;
Increases the buffer capacity to new_capacity
.
Synopsis
Declared in <fmt/format.h>
void
reserve(size_t new_capacity);
Resizes the buffer to contain count
elements. If T is a POD type new elements may not be initialized.
Synopsis
Declared in <fmt/format.h>
constexpr
void
resize(size_t count);
Synopsis
Declared in <fmt/ostream.h>
template<typename Char>
struct basic_ostream_formatter
: formatter<basic_string_view<Char>, Char>
Base Classes
Name |
Description |
Member Functions
Name |
|
Synopsis
Declared in <fmt/ostream.h>
template<
typename T,
typename Context>
decltype(ctx.out())
format(
T const& value,
Context& ctx) const;
Synopsis
Declared in <fmt/ostream.h>
void
set_debug_format() = delete;
Synopsis
Declared in <fmt/printf.h>
template<typename Char>
class basic_printf_context;
Types
Name |
Enums
Name |
Member Functions
Name |
Description |
|
Constructs a |
Synopsis
Declared in <fmt/printf.h>
using char_type = Char;
Synopsis
Declared in <fmt/printf.h>
enum Unnamed enum;
Members
Name |
|
Constructs a printf_context
object. References to the arguments are stored in the context object so make sure they have appropriate lifetimes.
Synopsis
Declared in <fmt/printf.h>
basic_printf_context(
basic_appender<Char> out,
basic_format_args<basic_printf_context> args);
Parameters
Name |
Description |
out |
The object to construct from |
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 |
Synopsis
Declared in <fmt/printf.h>
void
advance_to(basic_appender<Char>);
Synopsis
Declared in <fmt/printf.h>
basic_format_arg<basic_printf_context>
arg(int id) const;
Synopsis
Declared in <fmt/printf.h>
locale_ref
locale();
Synopsis
Declared in <fmt/printf.h>
basic_appender<Char>
out();
Synopsis
Declared in <fmt/base.h>
class basic_specs;
Member Functions
Name |
Derived Classes
Name |
Description |
Synopsis
Declared in <fmt/base.h>
constexpr
align
align() const;
Synopsis
Declared in <fmt/base.h>
constexpr
bool
alt() const;
Synopsis
Declared in <fmt/base.h>
constexpr
void
clear_alt();
Synopsis
Declared in <fmt/base.h>
constexpr
void
copy_fill_from(basic_specs const& specs);
Synopsis
Declared in <fmt/base.h>
constexpr
bool
dynamic() const;
Synopsis
Declared in <fmt/base.h>
constexpr
arg_id_kind
dynamic_precision() const;
Synopsis
Declared in <fmt/base.h>
constexpr
arg_id_kind
dynamic_width() const;
Synopses
Synopsis
Declared in <fmt/base.h>
template<typename Char>
constexpr
Char const*
fill() const;
Synopsis
Declared in <fmt/base.h>
template<typename Char>
constexpr
Char const*
fill() const;
Synopsis
Declared in <fmt/base.h>
constexpr
size_t
fill_size() const;
Synopsis
Declared in <fmt/base.h>
template<typename Char>
constexpr
Char
fill_unit() const;
Synopsis
Declared in <fmt/base.h>
constexpr
bool
localized() const;
Synopsis
Declared in <fmt/base.h>
constexpr
void
set_align(fmt::align a);
Synopsis
Declared in <fmt/base.h>
constexpr
void
set_alt();
Synopsis
Declared in <fmt/base.h>
constexpr
void
set_dynamic_precision(arg_id_kind p);
Synopsis
Declared in <fmt/base.h>
constexpr
void
set_dynamic_width(arg_id_kind w);
Synopses
Declared in <fmt/base.h>
constexpr
void
set_fill(char c);
template<typename Char>
constexpr
void
set_fill(basic_string_view<Char> s);
Synopsis
Declared in <fmt/base.h>
constexpr
void
set_fill(char c);
Synopsis
Declared in <fmt/base.h>
template<typename Char>
constexpr
void
set_fill(basic_string_view<Char> s);
Synopsis
Declared in <fmt/base.h>
constexpr
void
set_localized();
Synopsis
Declared in <fmt/base.h>
constexpr
void
set_sign(fmt::sign s);
Synopsis
Declared in <fmt/base.h>
constexpr
void
set_type(presentation_type t);
Synopsis
Declared in <fmt/base.h>
constexpr
void
set_upper();
Synopsis
Declared in <fmt/base.h>
constexpr
sign
sign() const;
Synopsis
Declared in <fmt/base.h>
constexpr
presentation_type
type() const;
Synopsis
Declared in <fmt/base.h>
constexpr
bool
upper() const;
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).
Synopsis
Declared in <fmt/base.h>
template<typename Char>
class basic_string_view;
Types
Member Functions
Name |
Description |
|
Constructors |
Returns a pointer to the string data. |
|
Returns the string size. |
|
Friends
Name |
Description |
Greater‐than‐or‐equal operator |
|
Greater‐than operator |
|
Less‐than‐or‐equal operator |
|
Less‐than operator |
|
Inequality operator |
|
Equality operator |
Synopsis
Declared in <fmt/base.h>
using iterator = Char const*;
Synopsis
Declared in <fmt/base.h>
using value_type = Char;
Constructors
Synopses
Declared in <fmt/base.h>
Default constructor
constexpr
basic_string_view() noexcept;
Construct from nullptr_t
constexpr
basic_string_view(nullptr_t value) = delete;
Construct from Char
constexpr
basic_string_view(Char const* s);
Constructs a string view from a std::basic_string
or a std::basic_string_view
object.
template<typename S>
constexpr
basic_string_view(S const& s) noexcept;
Constructs a string view object from a C string and a size.
constexpr
basic_string_view(
Char const* s,
size_t count) noexcept;
Default constructor
Synopsis
Declared in <fmt/base.h>
constexpr
basic_string_view() noexcept;
Construct from nullptr_t
Synopsis
Declared in <fmt/base.h>
constexpr
basic_string_view(nullptr_t value) = delete;
Parameters
Name |
Description |
value |
The object to construct from |
Construct from Char
Synopsis
Declared in <fmt/base.h>
constexpr
basic_string_view(Char const* s);
Parameters
Name |
Description |
s |
The object to construct from |
Constructs a string view from a std::basic_string
or a std::basic_string_view
object.
Synopsis
Declared in <fmt/base.h>
template<typename S>
constexpr
basic_string_view(S const& s) noexcept;
Parameters
Name |
Description |
s |
The object to copy construct from |
Constructs a string view object from a C string and a size.
Synopsis
Declared in <fmt/base.h>
constexpr
basic_string_view(
Char const* s,
size_t count) noexcept;
Parameters
Name |
Description |
s |
The object to construct from |
Synopsis
Declared in <fmt/base.h>
constexpr
iterator
begin() const noexcept;
Synopsis
Declared in <fmt/base.h>
constexpr
int
compare(basic_string_view other) const;
Returns a pointer to the string data.
Synopsis
Declared in <fmt/base.h>
constexpr
Char const*
data() const noexcept;
Return Value
a pointer to the string data.
Synopsis
Declared in <fmt/base.h>
constexpr
iterator
end() const noexcept;
Synopsis
Declared in <fmt/base.h>
constexpr
Char const&
operator[](size_t pos) const noexcept;
Synopsis
Declared in <fmt/base.h>
constexpr
void
remove_prefix(size_t n) noexcept;
Returns the string size.
Synopsis
Declared in <fmt/base.h>
constexpr
size_t
size() const noexcept;
Return Value
the string size.
Synopses
Declared in <fmt/base.h>
constexpr
bool
starts_with(Char c) const noexcept;
constexpr
bool
starts_with(basic_string_view<Char> sv) const noexcept;
constexpr
bool
starts_with(Char const* s) const;
Synopsis
Declared in <fmt/base.h>
constexpr
bool
starts_with(Char c) const noexcept;
Synopsis
Declared in <fmt/base.h>
constexpr
bool
starts_with(basic_string_view<Char> sv) const noexcept;
Synopsis
Declared in <fmt/base.h>
constexpr
bool
starts_with(Char const* s) const;
Synopsis
Declared in <fmt/os.h>
class buffered_file;
Member Functions
Name |
Description |
|
Constructors |
|
Destructor |
|
Assignment operators |
Friends
Name |
Description |
Constructors
Synopses
Declared in <fmt/os.h>
Default constructor
buffered_file() noexcept;
Copy constructor
buffered_file(buffered_file const& other) = delete;
Move constructor
buffered_file(buffered_file&& other) noexcept;
buffered_file(
cstring_view filename,
cstring_view mode);
Default constructor
Synopsis
Declared in <fmt/os.h>
buffered_file() noexcept;
Copy constructor
Synopsis
Declared in <fmt/os.h>
buffered_file(buffered_file const& other) = delete;
Parameters
Name |
Description |
other |
The object to copy construct from |
Move constructor
Synopsis
Declared in <fmt/os.h>
buffered_file(buffered_file&& other) noexcept;
Parameters
Name |
Description |
other |
The object to move construct from |
Synopsis
Declared in <fmt/os.h>
buffered_file(
cstring_view filename,
cstring_view mode);
Destructor
Synopsis
Declared in <fmt/os.h>
~buffered_file() noexcept;
Assignment operators
Synopses
Declared in <fmt/os.h>
void
operator=(buffered_file const& other) = delete;
Move assignment operator
Synopsis
Declared in <fmt/os.h>
void
operator=(buffered_file const& other) = delete;
Move assignment operator
Synopsis
Declared in <fmt/os.h>
buffered_file&
operator=(buffered_file&& other);
Return Value
Reference to the current object
Parameters
Name |
Description |
other |
The object to move assign from |
Synopsis
Declared in <fmt/os.h>
void
close();
Synopsis
Declared in <fmt/os.h>
int
descriptor() const;
Synopsis
Declared in <fmt/os.h>
FILE*
get() const noexcept;
Synopsis
Declared in <fmt/os.h>
template<typename... T>
void
print(
string_view fmt,
T const...&... args);
Synopsis
Declared in <fmt/format.h>
struct bytes;
Member Functions
Name |
Description |
|
Construct from |
Data Members
Name |
Construct from string_view
Synopsis
Declared in <fmt/format.h>
explicit
bytes(string_view s);
Parameters
Name |
Description |
s |
The object to construct from |
Synopsis
Declared in <fmt/format.h>
string_view data;
Synopsis
Declared in <fmt/compile.h>
class compiled_string;
Synopsis
Declared in <fmt/ranges.h>
template<typename...>
struct conjunction
: std::true_type
Base Classes
Name |
Description |
|
Synopsis
Declared in <fmt/ranges.h>
template<typename P>
struct conjunction<P>
: P
Base Classes
Name |
Description |
|
Synopsis
Declared in <fmt/ranges.h>
template<
typename P1,
typename... Pn>
struct conjunction<P1, Pn...>
: conditional_t<bool(P1::value), conjunction<Pn...>, P1>
Base Classes
Synopsis
Declared in <fmt/base.h>
class context;
Types
Enums
Name |
Member Functions
Name |
Description |
|
Constructs a |
|
|
Synopsis
Declared in <fmt/base.h>
using char_type = char;
Synopsis
Declared in <fmt/base.h>
using format_arg = basic_format_arg<context>;
Synopsis
Declared in <fmt/base.h>
using iterator = appender;
Synopsis
Declared in <fmt/base.h>
enum Unnamed enum;
Members
Name |
|
Constructs a context
object. References to the arguments are stored in the object so make sure they have appropriate lifetimes.
Synopses
Declared in <fmt/base.h>
Copy constructor
Move constructor
Constructs a context
object. References to the arguments are stored in the object so make sure they have appropriate lifetimes.
constexpr
context(
iterator out,
format_args args,
locale_ref loc = {});
Copy constructor
Synopsis
Declared in <fmt/base.h>
context(context const& other) = delete;
Parameters
Name |
Description |
other |
The object to copy construct from |
Move constructor
Synopsis
Declared in <fmt/base.h>
constexpr
context(context&& other) = default;
Parameters
Name |
Description |
other |
The object to move construct from |
Constructs a context
object. References to the arguments are stored in the object so make sure they have appropriate lifetimes.
Synopsis
Declared in <fmt/base.h>
constexpr
context(
iterator out,
format_args args,
locale_ref loc = {});
Parameters
Name |
Description |
out |
The object to construct from |
Synopsis
Declared in <fmt/base.h>
void
operator=(context const& other) = delete;
Synopsis
Declared in <fmt/base.h>
constexpr
void
advance_to(iterator);
Synopses
Declared in <fmt/base.h>
format_arg
arg(string_view name) const;
constexpr
format_arg
arg(int id) const;
Synopsis
Declared in <fmt/base.h>
format_arg
arg(string_view name) const;
Synopsis
Declared in <fmt/base.h>
constexpr
format_arg
arg(int id) const;
Synopsis
Declared in <fmt/base.h>
constexpr
int
arg_id(string_view name) const;
Synopsis
Declared in <fmt/base.h>
format_args const&
args() const;
Synopsis
Declared in <fmt/base.h>
constexpr
locale_ref
locale() const;
Synopsis
Declared in <fmt/base.h>
constexpr
iterator
out() const;
Synopsis
Declared in <fmt/chrono.h>
class day;
Member Functions
Name |
Description |
|
Constructors |
Conversion to |
Constructors
Synopses
Synopsis
Declared in <fmt/chrono.h>
constexpr
day() = default;
Construct from unsigned int
Synopsis
Declared in <fmt/chrono.h>
constexpr
explicit
day(unsigned int d) noexcept;
Parameters
Name |
Description |
d |
The value to construct from |
Conversion to unsigned int
Synopsis
Declared in <fmt/chrono.h>
constexpr
explicit
operator unsigned int() const noexcept;
Return Value
The object converted to unsigned int
A dynamic list of formatting arguments with storage.
Synopsis
Declared in <fmt/args.h>
template<typename Context>
class dynamic_format_arg_store;
Member Functions
Name |
Description |
|
Default constructor |
Erase all elements from the store. |
|
|
|
Reserves space to store at least |
|
Returns the number of elements in the store. |
|
Conversion to |
Friends
Name |
Description |
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 |
Description
It can be implicitly converted into fmt::basic_format_args
for passing into type‐erased formatting functions such as fmt::vformat
.
Default constructor
Synopsis
Declared in <fmt/args.h>
constexpr
dynamic_format_arg_store() = default;
Erase all elements from the store.
Synopsis
Declared in <fmt/args.h>
void
clear();
push_back
overloads
Synopses
Declared in <fmt/args.h>
Adds a reference to the argument into the dynamic store for later passing to a formatting function.
template<typename T>
void
push_back(std::reference_wrapper<T> arg);
Adds an argument into the dynamic store for later passing to a formatting function.
template<typename T>
void
push_back(T const& arg);
Adds named argument into the dynamic store for later passing to a formatting function. std::reference_wrapper
is supported to avoid copying of the argument. The name is always copied into the store.
template<typename T>
void
push_back(/* implementation-defined */ const& arg);
Adds a reference to the argument into the dynamic store for later passing to a formatting function.
Synopsis
Declared in <fmt/args.h>
template<typename T>
void
push_back(std::reference_wrapper<T> arg);
Description
Example:
fmt::dynamic_format_arg_store<fmt::format_context> store; char band[]= "Rolling Stones"; store.push_back(std::cref(band)); band[9]= 'c'; // Changing str affects the output. std::string result = fmt::vformat("{}", store); // result == "Rolling Scones"
Adds an argument into the dynamic store for later passing to a formatting function.
Synopsis
Declared in <fmt/args.h>
template<typename T>
void
push_back(T const& arg);
Description
Note that custom types and string types (but not string views) are copied into the store dynamically allocating memory if necessary.
Example:
fmt::dynamic_format_arg_store<fmt::format_context> store; store.push_back(42); store.push_back("abc"); store.push_back(1.5f); std::string result = fmt::vformat("{} and {} and {}", store);
Adds named argument into the dynamic store for later passing to a formatting function. std::reference_wrapper
is supported to avoid copying of the argument. The name is always copied into the store.
Synopsis
Declared in <fmt/args.h>
template<typename T>
void
push_back(/* implementation-defined */ const& arg);
Reserves space to store at least new_cap
arguments including new_cap_named
named arguments.
Synopsis
Declared in <fmt/args.h>
void
reserve(
size_t new_cap,
size_t new_cap_named);
Returns the number of elements in the store.
Synopsis
Declared in <fmt/args.h>
size_t
size() const noexcept;
Return Value
the number of elements in the store.
Conversion to basic_format_args
Synopsis
Declared in <fmt/args.h>
operator basic_format_args<Context>() const;
Return Value
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
:
Synopsis
Declared in <fmt/os.h>
class file;
An error reported from a formatting function.
Synopsis
Declared in <fmt/format.h>
class format_error
: public std::runtime_error
Base Classes
Name |
Description |
|
Member Functions
Name |
|
Using Declarations
Name |
Synopsis
Declared in <stdexcept>
runtime_error&
operator=(runtime_error const& value) noexcept;
Synopsis
Declared in <stdexcept>
virtual
char const*
what() const noexcept override;
Synopsis
Declared in <fmt/format.h>
using std::runtime_error::format_error;
Synopsis
Declared in <fmt/format.h>
template<typename Locale>
class format_facet
: public Locale::facet
Base Classes
Name |
Description |
|
Member Functions
Name |
Description |
|
Construct from |
|
|
Static Data Members
Name |
Protected Member Functions
Name |
|
Construct from Locale
Synopsis
Declared in <fmt/format.h>
explicit
format_facet(Locale& loc);
Parameters
Name |
Description |
loc |
The object to copy construct from |
Synopsis
Declared in <fmt/format.h>
explicit
format_facet(
string_view sep = "",
std::string grouping = "\3",
std::string decimal_point = ".");
Synopsis
Declared in <fmt/format.h>
bool
put(
appender out,
loc_value val,
format_specs const& specs) const;
Synopsis
Declared in <fmt/format.h>
static
Locale::id id;
Synopsis
Declared in <fmt/format.h>
virtual
bool
do_put(
appender out,
loc_value val,
format_specs const& specs) const;
Synopsis
Declared in <fmt/format.h>
template<>
class format_facet<locale>
: public locale::facet
Base Classes
Name |
Description |
|
Member Functions
Name |
Description |
|
Constructors |
Static Data Members
Name |
Protected Member Functions
Name |
|
Constructors
Synopses
Declared in <fmt/format.h>
Construct from locale
explicit
format_facet(locale& loc);
explicit
format_facet(
string_view sep = "",
std::string grouping = "\3",
std::string decimal_point = ".");
Construct from locale
Synopsis
Declared in <fmt/format.h>
explicit
format_facet(locale& loc);
Parameters
Name |
Description |
loc |
The object to copy construct from |
Synopsis
Declared in <fmt/format.h>
explicit
format_facet(
string_view sep = "",
std::string grouping = "\3",
std::string decimal_point = ".");
Synopsis
Declared in <fmt/format.h>
bool
put(
appender out,
loc_value val,
format_specs const& specs) const;
Synopsis
Declared in <fmt/format.h>
static
locale::id id;
Synopsis
Declared in <fmt/format.h>
virtual
bool
do_put(
appender out,
loc_value val,
format_specs const& specs) const;
A fast integer formatter.
Synopsis
Declared in <fmt/format.h>
class format_int;
Member Functions
Name |
Description |
|
Constructors |
Returns a pointer to the output buffer content with terminating null character appended. |
|
Returns a pointer to the output buffer content. No terminating null character is appended. |
|
Returns the number of characters written to the output buffer. |
|
Returns the content of the output buffer as an |
Constructors
Synopses
Declared in <fmt/format.h>
Construct from int
constexpr
explicit
format_int(int value);
Construct from unsigned int
constexpr
explicit
format_int(unsigned int value);
Construct from long
constexpr
explicit
format_int(long value);
Construct from unsigned long
constexpr
explicit
format_int(unsigned long value);
Construct from long long
constexpr
explicit
format_int(long long value);
Construct from unsigned long long
constexpr
explicit
format_int(unsigned long long value);
Construct from int
Synopsis
Declared in <fmt/format.h>
constexpr
explicit
format_int(int value);
Parameters
Name |
Description |
value |
The value to construct from |
Construct from unsigned int
Synopsis
Declared in <fmt/format.h>
constexpr
explicit
format_int(unsigned int value);
Parameters
Name |
Description |
value |
The value to construct from |
Construct from long
Synopsis
Declared in <fmt/format.h>
constexpr
explicit
format_int(long value);
Parameters
Name |
Description |
value |
The value to construct from |
Construct from unsigned long
Synopsis
Declared in <fmt/format.h>
constexpr
explicit
format_int(unsigned long value);
Parameters
Name |
Description |
value |
The value to construct from |
Construct from long long
Synopsis
Declared in <fmt/format.h>
constexpr
explicit
format_int(long long value);
Parameters
Name |
Description |
value |
The value to construct from |
Construct from unsigned long long
Synopsis
Declared in <fmt/format.h>
constexpr
explicit
format_int(unsigned long long value);
Parameters
Name |
Description |
value |
The value to construct from |
Returns a pointer to the output buffer content with terminating null character appended.
Synopsis
Declared in <fmt/format.h>
constexpr
char const*
c_str() const;
Returns a pointer to the output buffer content. No terminating null character is appended.
Synopsis
Declared in <fmt/format.h>
constexpr
char const*
data() const;
Returns the number of characters written to the output buffer.
Synopsis
Declared in <fmt/format.h>
constexpr
size_t
size() const;
Return Value
the number of characters written to the output buffer.
Returns the content of the output buffer as an std::string
.
Synopsis
Declared in <fmt/format.h>
std::string
str() const;
Return Value
the content of the output buffer as an std::string
.
Synopsis
Declared in <fmt/base.h>
struct format_specs
: basic_specs
Base Classes
Name |
Description |
Member Functions
Name |
Description |
|
Default constructor |
Synopsis
Declared in <fmt/base.h>
constexpr
format_specs();
Synopsis
Declared in <fmt/base.h>
int precision;
Synopsis
Declared in <fmt/base.h>
int width;
Synopsis
Declared in <fmt/base.h>
template<typename OutputIt>
struct format_to_n_result;
Data Members
Non-Member Functions
Name |
Description |
Formats |
Iterator past the end of the output range.
Synopsis
Declared in <fmt/base.h>
OutputIt out;
Total (not truncated) output size.
Synopsis
Declared in <fmt/base.h>
size_t size;
Synopsis
Declared in <fmt/base.h>
struct format_to_result;
Member Functions
Name |
Description |
Conversion to |
Data Members
Synopsis
Declared in <fmt/base.h>
constexpr
operator char*() const;
Return Value
The object converted to char
Pointer to just after the last successful write in the array.
Synopsis
Declared in <fmt/base.h>
char* out;
Specifies if the output was truncated.
Synopsis
Declared in <fmt/base.h>
bool truncated;
Synopsis
Declared in <fmt/base.h>
template<
typename T,
typename Char = char,
typename Enable = void>
struct formatter;
Member Functions
Name |
Description |
|
Default constructor |
Derived Classes
Name |
Description |
Default constructor
Synopsis
Declared in <fmt/base.h>
formatter() = delete;
Synopsis
Declared in <fmt/format‐inl.h>
template<>
struct formatter</* implementation-defined */>;
Synopsis
Declared in <fmt/format‐inl.h>
format_context::iterator
format(
/* implementation-defined */ const& n,
format_context& ctx) const;
Synopsis
Declared in <fmt/format‐inl.h>
constexpr
format_parse_context::iterator
parse(format_parse_context& ctx);
Synopsis
Declared in <fmt/format.h>
template<typename FormatContext>
decltype(ctx.out())
format(
bytes b,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/format.h>
constexpr
char const*
parse(parse_context& ctx);
Synopsis
Declared in <fmt/std.h>
template<>
struct formatter<std::error_code>;
Synopsis
Declared in <fmt/std.h>
template<typename FormatContext>
constexpr
decltype(ctx.out())
format(
std::error_code const& ec,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/std.h>
constexpr
char const*
parse(parse_context& ctx);
Synopsis
Declared in <fmt/std.h>
template<>
struct formatter<std::source_location>;
Synopsis
Declared in <fmt/std.h>
template<typename FormatContext>
decltype(ctx.out())
format(
std::source_location const& loc,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/std.h>
constexpr
auto
parse(parse_context& ctx);
Synopsis
Declared in <fmt/std.h>
template<>
struct formatter<std::type_info>;
Synopsis
Declared in <fmt/std.h>
template<typename Context>
decltype(ctx.out())
format(
std::type_info const& ti,
Context& ctx) const;
Synopsis
Declared in <fmt/std.h>
constexpr
char const*
parse(parse_context& ctx);
Synopsis
Declared in <fmt/format.h>
template<typename T>
struct formatter<group_digits_view<T>>
: formatter<T>
Base Classes
Name |
Description |
Synopsis
Declared in <fmt/format.h>
template<typename FormatContext>
decltype(ctx.out())
format(
group_digits_view<T> view,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/format.h>
constexpr
char const*
parse(parse_context& ctx);
Synopsis
Declared in <fmt/std.h>
template<typename T>
requires std::is_base_of<std::exception, T>::value
struct formatter<T, char>;
Synopsis
Declared in <fmt/std.h>
template<typename Context>
decltype(ctx.out())
format(
std::exception const& ex,
Context& ctx) const;
Synopsis
Declared in <fmt/std.h>
constexpr
char const*
parse(parse_context& ctx);
Synopsis
Declared in <fmt/std.h>
template<typename Char>
struct formatter<std::atomic_flag, Char>
: formatter<bool, Char>
Base Classes
Name |
Description |
Member Functions
Name |
Synopsis
Declared in <fmt/std.h>
template<typename FormatContext>
decltype(ctx.out())
format(
std::atomic_flag const& v,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/format.h>
template<typename Char>
struct formatter<std::byte, Char>
: formatter<unsigned int, Char>
Base Classes
Name |
Description |
Member Functions
Name |
Static Member Functions
Name |
Synopsis
Declared in <fmt/format.h>
template<typename Context>
decltype(ctx.out())
format(
std::byte b,
Context& ctx) const;
Synopsis
Declared in <fmt/format.h>
static
unsigned char
format_as(std::byte b);
Synopsis
Declared in <fmt/chrono.h>
template<typename FormatContext>
decltype(ctx.out())
format(
day d,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/chrono.h>
constexpr
Char const*
parse(parse_context<Char>& ctx);
Synopsis
Declared in <fmt/format.h>
template<typename Char>
struct formatter</* implementation-defined */, Char>
: /* implementation-defined */
Base Classes
Name |
Description |
|
Synopsis
Declared in <fmt/std.h>
template<typename Char>
struct formatter<std::thread::id, Char>
: basic_ostream_formatter<Char>
Base Classes
Name |
Description |
Synopsis
Declared in <fmt/std.h>
template<typename Char>
struct formatter<std::monostate, Char>;
Synopsis
Declared in <fmt/std.h>
template<typename FormatContext>
decltype(ctx.out())
format(
std::monostate const&,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/std.h>
constexpr
Char const*
parse(parse_context<Char>& ctx);
Synopsis
Synopsis
Declared in <fmt/chrono.h>
template<typename FormatContext>
decltype(ctx.out())
format(
month m,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/chrono.h>
constexpr
Char const*
parse(parse_context<Char>& ctx);
Synopsis
Declared in <fmt/format.h>
template<typename Char>
struct formatter<std::nullptr_t, Char>
: formatter<void const*, Char>
Base Classes
Name |
Description |
Member Functions
Name |
Synopsis
Declared in <fmt/format.h>
template<typename FormatContext>
constexpr
decltype()
format(
std::nullptr_t value,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/std.h>
template<typename Char>
struct formatter<std::filesystem::path, Char>;
Member Functions
Synopsis
Declared in <fmt/std.h>
template<typename FormatContext>
auto
format(
std::filesystem::path const& p,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/std.h>
constexpr
auto
parse(parse_context<Char>& ctx);
Synopsis
Declared in <fmt/std.h>
constexpr
void
set_debug_format(bool set = true);
Synopsis
Declared in <fmt/chrono.h>
template<typename Char>
struct formatter<tm, Char>;
Protected Member Functions
Synopsis
Declared in <fmt/chrono.h>
template<typename FormatContext>
decltype(ctx.out())
format(
tm const& tm,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/chrono.h>
constexpr
Char const*
parse(parse_context<Char>& ctx);
Synopsis
Declared in <fmt/chrono.h>
template<
typename Duration,
typename FormatContext>
decltype(ctx.out())
do_format(
tm const& tm,
FormatContext& ctx,
Duration const* subsecs) const;
Synopsis
Declared in <fmt/chrono.h>
constexpr
Char const*
do_parse(
parse_context<Char>& ctx,
bool has_timezone);
Synopsis
Declared in <fmt/chrono.h>
bool
localized() const;
Synopsis
Declared in <fmt/chrono.h>
constexpr
void
set_localized();
Synopsis
Synopsis
Declared in <fmt/chrono.h>
template<typename FormatContext>
decltype(ctx.out())
format(
weekday wd,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/chrono.h>
constexpr
Char const*
parse(parse_context<Char>& ctx);
Synopsis
Synopsis
Declared in <fmt/chrono.h>
template<typename FormatContext>
decltype(ctx.out())
format(
year y,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/chrono.h>
constexpr
Char const*
parse(parse_context<Char>& ctx);
Synopsis
Declared in <fmt/chrono.h>
template<typename Char>
struct formatter<year_month_day, Char>;
Synopsis
Declared in <fmt/chrono.h>
template<typename FormatContext>
decltype(ctx.out())
format(
year_month_day val,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/chrono.h>
constexpr
Char const*
parse(parse_context<Char>& ctx);
Synopsis
Declared in <fmt/format.h>
template<typename Char>
struct formatter</* implementation-defined */, Char>
: formatter<basic_string_view<Char>, Char>
Base Classes
Name |
Description |
Member Functions
Name |
Synopsis
Declared in <fmt/format.h>
template<typename FormatContext>
constexpr
decltype()
format(
/* implementation-defined */ value,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/format.h>
template<typename Char>
struct formatter<signed char, Char>
: formatter<int, Char>
Base Classes
Name |
Description |
Member Functions
Name |
Synopsis
Declared in <fmt/format.h>
template<typename FormatContext>
constexpr
decltype()
format(
signed char value,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/format.h>
template<typename Char>
struct formatter<unsigned char, Char>
: formatter<unsigned int, Char>
Base Classes
Name |
Description |
Member Functions
Name |
Synopsis
Declared in <fmt/format.h>
template<typename FormatContext>
constexpr
decltype()
format(
unsigned char value,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/format.h>
template<typename Char>
struct formatter<short, Char>
: formatter<int, Char>
Base Classes
Name |
Description |
Member Functions
Name |
Synopsis
Declared in <fmt/format.h>
template<typename FormatContext>
constexpr
decltype()
format(
short value,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/format.h>
template<typename Char>
struct formatter<unsigned short, Char>
: formatter<unsigned int, Char>
Base Classes
Name |
Description |
Member Functions
Name |
Synopsis
Declared in <fmt/format.h>
template<typename FormatContext>
constexpr
decltype()
format(
unsigned short value,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/format.h>
template<typename Char>
struct formatter<long, Char>
: formatter</* implementation-defined */, Char>
Base Classes
Name |
Description |
|
Member Functions
Name |
Synopsis
Declared in <fmt/format.h>
template<typename FormatContext>
constexpr
decltype()
format(
long value,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/format.h>
template<typename Char>
struct formatter<unsigned long, Char>
: formatter</* implementation-defined */, Char>
Base Classes
Name |
Description |
|
Member Functions
Name |
Synopsis
Declared in <fmt/format.h>
template<typename FormatContext>
constexpr
decltype()
format(
unsigned long value,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/format.h>
template<typename Char>
struct formatter<Char*, Char>
: formatter<Char const*, Char>
Base Classes
Name |
Description |
Member Functions
Name |
Synopsis
Declared in <fmt/format.h>
template<typename FormatContext>
constexpr
decltype()
format(
Char* value,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/format.h>
template<typename Char>
struct formatter<void*, Char>
: formatter<void const*, Char>
Base Classes
Name |
Description |
Member Functions
Name |
Synopsis
Declared in <fmt/format.h>
template<typename FormatContext>
constexpr
decltype()
format(
void* value,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/std.h>
template<
typename BitRef,
typename Char>
requires detail::is_bit_reference_like<BitRef>::value
struct formatter<BitRef, Char>
: formatter<bool, Char>
Base Classes
Name |
Description |
Member Functions
Name |
Synopsis
Declared in <fmt/std.h>
template<typename FormatContext>
constexpr
decltype(ctx.out())
format(
BitRef const& v,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/ranges.h>
template<
typename R,
typename Char>
requires conjunction<
bool_constant<
range_format_kind<R, Char>::value != range_format::disabled &&
range_format_kind<R, Char>::value != range_format::map &&
range_format_kind<R, Char>::value != range_format::string &&
range_format_kind<R, Char>::value != range_format::debug_string>,
detail::is_formattable_delayed<R, Char>>::value
struct formatter<R, Char>;
Types
Name |
Synopsis
Declared in <fmt/ranges.h>
using nonlocking = void;
Default constructor
Synopsis
Declared in <fmt/ranges.h>
constexpr
formatter();
Synopsis
Declared in <fmt/ranges.h>
template<typename FormatContext>
decltype(ctx.out())
format(
range_type& range,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/ranges.h>
constexpr
Char const*
parse(parse_context<Char>& ctx);
Synopsis
Declared in <fmt/ranges.h>
template<
typename R,
typename Char>
requires conjunction<
bool_constant<range_format_kind<R, Char>::value == range_format::map>,
detail::is_formattable_delayed<R, Char>>::value
struct formatter<R, Char>;
Member Functions
Synopsis
Declared in <fmt/ranges.h>
constexpr
formatter();
Synopsis
Declared in <fmt/ranges.h>
template<typename FormatContext>
decltype(ctx.out())
format(
map_type& map,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/ranges.h>
constexpr
Char const*
parse(parse_context<Char>& ctx);
Synopsis
Declared in <fmt/ranges.h>
template<
typename R,
typename Char>
requires range_format_kind<R, Char>::value == range_format::string ||
range_format_kind<R, Char>::value ==
range_format::debug_string
struct formatter<R, Char>;
Synopsis
Declared in <fmt/ranges.h>
template<typename FormatContext>
decltype(ctx.out())
format(
range_type& range,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/ranges.h>
constexpr
Char const*
parse(parse_context<Char>& ctx);
Synopsis
Declared in <fmt/base.h>
template<
typename T,
typename Char>
requires detail::type_constant<T, Char>::value !=
detail::type::custom_type
struct formatter<T, Char>
: /* implementation-defined */
Base Classes
Name |
Description |
|
Synopsis
Declared in <fmt/ranges.h>
template<
typename T,
typename Char>
requires conjunction<detail::is_container_adaptor_like<T>,
bool_constant<range_format_kind<T, Char>::value ==
range_format::disabled>>::value
struct formatter<T, Char>
: formatter</* implementation-defined */, Char>
Base Classes
Name |
Description |
|
Types
Name |
Member Functions
Name |
Synopsis
Declared in <fmt/ranges.h>
using all = /* implementation-defined */;
Synopsis
Declared in <fmt/ranges.h>
template<typename FormatContext>
decltype(ctx.out())
format(
T const& value,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/ranges.h>
template<
typename Tuple,
typename Char>
requires fmt::is_tuple_like<Tuple>::value &&
fmt::is_tuple_formattable<Tuple, Char>::value
struct formatter<Tuple, Char>;
Member Functions
Name |
Description |
|
Default constructor |
Default constructor
Synopsis
Declared in <fmt/ranges.h>
constexpr
formatter();
Synopsis
Declared in <fmt/ranges.h>
template<typename FormatContext>
decltype(ctx.out())
format(
Tuple const& value,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/ranges.h>
constexpr
Char const*
parse(parse_context<Char>& ctx);
Synopsis
Declared in <fmt/ranges.h>
constexpr
void
set_brackets(
basic_string_view<Char> open,
basic_string_view<Char> close);
Synopsis
Declared in <fmt/ranges.h>
constexpr
void
set_separator(basic_string_view<Char> sep);
Synopsis
Declared in <fmt/std.h>
template<
typename Variant,
typename Char>
requires std::conjunction_v<
is_variant_like<Variant>,
detail::is_variant_formattable<Variant, Char>>
struct formatter<Variant, Char>;
Synopsis
Declared in <fmt/std.h>
template<typename FormatContext>
decltype(ctx.out())
format(
Variant const& value,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/std.h>
constexpr
Char const*
parse(parse_context<Char>& ctx);
Synopsis
Declared in <fmt/std.h>
template<
typename T,
typename Char>
requires is_formattable<T, Char>::value
struct formatter<std::atomic<T>, Char>
: formatter<T, Char>
Base Classes
Name |
Description |
Member Functions
Name |
Synopsis
Declared in <fmt/std.h>
template<typename FormatContext>
decltype(ctx.out())
format(
std::atomic<T> const& v,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/std.h>
template<
size_t N,
typename Char>
struct formatter<std::bitset<N>, Char>
: nested_formatter<basic_string_view<Char>, Char>
Base Classes
Name |
Description |
|
Member Functions
Name |
Synopsis
Declared in <fmt/std.h>
template<typename FormatContext>
decltype(ctx.out())
format(
std::bitset<N> const& bs,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/std.h>
template<
typename T,
typename Char>
struct formatter<std::complex<T>, Char>;
Synopsis
Declared in <fmt/std.h>
template<typename FormatContext>
decltype(ctx.out())
format(
std::complex<T> const& c,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/std.h>
constexpr
Char const*
parse(parse_context<Char>& ctx);
Synopsis
Declared in <fmt/chrono.h>
template<
typename Duration,
typename Char>
struct formatter<local_time<Duration>, Char>;
Synopsis
Declared in <fmt/chrono.h>
template<typename FormatContext>
decltype(ctx.out())
format(
local_time<Duration> val,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/chrono.h>
constexpr
Char const*
parse(parse_context<Char>& ctx);
Synopsis
Declared in <fmt/format.h>
template<
typename T,
typename Char>
struct formatter<nested_view<T, Char>, Char>;
Synopsis
Declared in <fmt/format.h>
template<typename FormatContext>
decltype(ctx.out())
format(
nested_view<T, Char> view,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/format.h>
constexpr
Char const*
parse(parse_context<Char>& ctx);
Synopsis
Declared in <fmt/std.h>
template<
typename T,
typename Char>
requires is_formattable<T, Char>::value
struct formatter<std::optional<T>, Char>;
Synopsis
Declared in <fmt/std.h>
template<typename FormatContext>
decltype(ctx.out())
format(
std::optional<T> const& opt,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/std.h>
constexpr
auto
parse(parse_context<Char>& ctx);
Synopsis
Declared in <fmt/std.h>
template<
typename T,
typename Char>
requires is_formattable<remove_cvref_t<T>, Char>::value &&
!detail::has_format_as<T>::value &&
!detail::has_format_as_member<T>::value
struct formatter<std::reference_wrapper<T>, Char>
: formatter<remove_cvref_t<T>, Char>
Base Classes
Name |
Description |
Member Functions
Name |
Synopsis
Declared in <fmt/std.h>
template<typename FormatContext>
decltype(ctx.out())
format(
std::reference_wrapper<T> ref,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/ostream.h>
template<
typename T,
typename Char>
struct formatter</* implementation-defined */, Char>
: basic_ostream_formatter<Char>
Base Classes
Name |
Description |
Member Functions
Name |
Synopsis
Declared in <fmt/ostream.h>
template<typename Context>
decltype(ctx.out())
format(
/* implementation-defined */ view,
Context& ctx) const;
Synopsis
Declared in <fmt/color.h>
template<
typename T,
typename Char>
struct formatter</* implementation-defined */, Char>
: formatter<T, Char>
Base Classes
Name |
Description |
Member Functions
Name |
Synopsis
Declared in <fmt/color.h>
template<typename FormatContext>
decltype(ctx.out())
format(
/* implementation-defined */ const& arg,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/chrono.h>
template<
typename Char,
typename Duration>
struct formatter<sys_time<Duration>, Char>;
Synopsis
Declared in <fmt/chrono.h>
template<typename FormatContext>
decltype(ctx.out())
format(
sys_time<Duration> val,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/chrono.h>
constexpr
Char const*
parse(parse_context<Char>& ctx);
Synopsis
Declared in <fmt/ranges.h>
template<
typename Tuple,
typename Char>
requires is_tuple_like<Tuple>::value
struct formatter<tuple_join_view<Tuple, Char>, Char>;
Synopsis
Declared in <fmt/ranges.h>
template<typename FormatContext>
FormatContext::iterator
format(
tuple_join_view<Tuple, Char> const& value,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/ranges.h>
constexpr
Char const*
parse(parse_context<Char>& ctx);
Synopsis
Declared in <fmt/format.h>
template<
int N,
typename Char>
struct formatter</* implementation-defined */, Char>
: formatter<long long, Char>
Base Classes
Name |
Description |
Synopsis
Declared in <fmt/chrono.h>
template<
typename Duration,
typename Char>
struct formatter<utc_time<Duration>, Char>
: formatter<sys_time<Duration>, Char>
Base Classes
Name |
Description |
Member Functions
Name |
Synopsis
Declared in <fmt/chrono.h>
template<typename FormatContext>
decltype(ctx.out())
format(
utc_time<Duration> val,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/format.h>
template<
typename Char,
size_t N>
struct formatter<Char[], Char>
: formatter<basic_string_view<Char>, Char>
Base Classes
Name |
Description |
Synopsis
Declared in <fmt/format.h>
template<
typename Char,
typename Traits,
typename Allocator>
class formatter<std::basic_string<Char, Traits, Allocator>, Char>
: public formatter<basic_string_view<Char>, Char>
Base Classes
Name |
Description |
Synopsis
Declared in <fmt/chrono.h>
template<
typename Rep,
typename Period,
typename Char>
struct formatter<std::chrono::duration<Rep, Period>, Char>;
Synopsis
Declared in <fmt/chrono.h>
template<typename FormatContext>
decltype(ctx.out())
format(
std::chrono::duration<Rep, Period> d,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/chrono.h>
constexpr
Char const*
parse(parse_context<Char>& ctx);
Synopsis
Declared in <fmt/std.h>
template<
typename T,
typename E,
typename Char>
requires (std::is_void<T>::value ||
is_formattable<T, Char>::value) &&
is_formattable<E, Char>::value
struct formatter<std::expected<T, E>, Char>;
Synopsis
Declared in <fmt/std.h>
template<typename FormatContext>
decltype(ctx.out())
format(
std::expected<T, E> const& value,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/std.h>
constexpr
Char const*
parse(parse_context<Char>& ctx);
Synopsis
Declared in <fmt/ranges.h>
template<
typename It,
typename Sentinel,
typename Char>
struct formatter<join_view<It, Sentinel, Char>, Char>;
Types
Name |
Synopsis
Declared in <fmt/ranges.h>
using nonlocking = void;
Synopsis
Declared in <fmt/ranges.h>
template<typename FormatContext>
decltype(ctx.out())
format(
view& value,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/ranges.h>
constexpr
Char const*
parse(parse_context<Char>& ctx);
Synopsis
Declared in <fmt/format.h>
template<
typename T,
typename Char>
struct formatter<T, Char, void_t</* implementation-defined */>>
: formatter</* implementation-defined */, Char>
Base Classes
Name |
Description |
|
Member Functions
Name |
Synopsis
Declared in <fmt/format.h>
template<typename FormatContext>
constexpr
decltype(ctx.out())
format(
T const& value,
FormatContext& ctx) const;
A compile‐time format string. Use format_string
in the public API to prevent type deduction.
Synopsis
Declared in <fmt/base.h>
template<typename... T>
struct fstring;
Types
Name |
Member Functions
Name |
Description |
|
Constructors |
Conversion to |
Data Members
Name |
Synopsis
Synopses
Declared in <fmt/base.h>
Construct from runtime_format_string
Construct from S
template<typename S>
[[always_inline]]
fstring(S const& value);
Construct from S
template<typename S>
[[always_inline]]
consteval
fstring(S const& s);
Construct from char
template<size_t N>
[[always_inline]]
consteval
fstring(char const(& s)[]);
Construct from runtime_format_string
Synopsis
Declared in <fmt/base.h>
fstring(runtime_format_string fmt);
Parameters
Name |
Description |
fmt |
The object to construct from |
Construct from S
Synopsis
Declared in <fmt/base.h>
template<typename S>
[[always_inline]]
fstring(S const& value);
Parameters
Name |
Description |
value |
The object to copy construct from |
Construct from S
Synopsis
Declared in <fmt/base.h>
template<typename S>
[[always_inline]]
consteval
fstring(S const& s);
Parameters
Name |
Description |
s |
The object to copy construct from |
Construct from char
Synopsis
Declared in <fmt/base.h>
template<size_t N>
[[always_inline]]
consteval
fstring(char const(& s)[]);
Parameters
Name |
Description |
s |
The value to construct from |
Synopsis
Declared in <fmt/base.h>
string_view
get() const;
Conversion to string_view
Synopsis
Declared in <fmt/base.h>
[[always_inline]]
operator string_view const&() const;
Return Value
The object converted to string_view
Synopsis
Declared in <fmt/base.h>
string_view str;
Synopsis
Declared in <fmt/format.h>
template<
typename OutputIt,
typename Char>
class generic_context;
Types
Name |
Enums
Name |
Member Functions
Name |
Description |
|
Constructors |
|
|
Synopsis
Declared in <fmt/format.h>
using char_type = Char;
Synopsis
Declared in <fmt/format.h>
using iterator = OutputIt;
Synopsis
Declared in <fmt/format.h>
enum Unnamed enum;
Members
Name |
|
Constructors
Synopses
Declared in <fmt/format.h>
Copy constructor
generic_context(generic_context const& other) = delete;
Move constructor
generic_context(generic_context&& other) = default;
constexpr
generic_context(
OutputIt out,
basic_format_args<generic_context> args,
locale_ref loc = {});
Copy constructor
Synopsis
Declared in <fmt/format.h>
generic_context(generic_context const& other) = delete;
Parameters
Name |
Description |
other |
The object to copy construct from |
Move constructor
Synopsis
Declared in <fmt/format.h>
generic_context(generic_context&& other) = default;
Parameters
Name |
Description |
other |
The object to move construct from |
Synopsis
Declared in <fmt/format.h>
constexpr
generic_context(
OutputIt out,
basic_format_args<generic_context> args,
locale_ref loc = {});
Synopsis
Declared in <fmt/format.h>
void
operator=(generic_context const& other) = delete;
Synopsis
Declared in <fmt/format.h>
void
advance_to(iterator it);
Synopses
Declared in <fmt/format.h>
constexpr
basic_format_arg<generic_context>
arg(int id) const;
Synopsis
Declared in <fmt/format.h>
Synopsis
Declared in <fmt/format.h>
constexpr
basic_format_arg<generic_context>
arg(int id) const;
Synopsis
Declared in <fmt/format.h>
constexpr
int
arg_id(basic_string_view<Char> name) const;
Synopsis
Declared in <fmt/format.h>
constexpr
locale_ref
locale() const;
Synopsis
Declared in <fmt/format.h>
constexpr
iterator
out() const;
Synopsis
Declared in <fmt/format.h>
template<typename T>
struct group_digits_view;
Data Members
Name |
Non-Member Functions
Name |
Description |
Returns a view that formats an integer value using ',' as a locale‐independent thousands separator. |
Synopsis
Declared in <fmt/format.h>
T value;
Synopsis
Declared in <fmt/compile.h>
template<typename S>
struct is_compiled_string
: std::is_base_of<compiled_string, S>
Base Classes
Name |
Description |
|
Synopsis
Declared in <fmt/base.h>
template<typename T>
struct is_contiguous
: std::false_type
Base Classes
Name |
Description |
|
Synopsis
Declared in <fmt/format.h>
template<
typename T,
size_t SIZE,
typename Allocator>
struct is_contiguous<basic_memory_buffer<T, SIZE, Allocator>>
: std::true_type
Base Classes
Name |
Description |
|
Synopsis
Declared in <fmt/format.h>
template<
typename Char,
typename Traits,
typename Allocator>
struct is_contiguous<std::basic_string<Char, Traits, Allocator>>
: std::true_type
Base Classes
Name |
Description |
|
Synopsis
Declared in <fmt/ranges.h>
template<
typename T,
typename Char>
struct is_range;
Static Data Members
Name |
Synopsis
Declared in <fmt/ranges.h>
inline constexpr static
bool value = detail::is_range_<T>::value && !detail::has_to_string_view<T>::value;
Synopsis
Declared in <fmt/ranges.h>
template<
typename T,
typename C>
struct is_tuple_formattable;
Static Data Members
Name |
Synopsis
Declared in <fmt/ranges.h>
inline constexpr static
bool value = detail::is_tuple_formattable_<T, C>::value;
Synopsis
Declared in <fmt/ranges.h>
template<typename T>
struct is_tuple_like;
Static Data Members
Name |
Synopsis
Declared in <fmt/ranges.h>
inline constexpr static
bool value = detail::is_tuple_like_<T>::value && !detail::is_range_<T>::value;
Synopsis
Declared in <fmt/std.h>
template<typename T>
struct is_variant_like;
Static Data Members
Name |
Synopsis
Declared in <fmt/std.h>
inline constexpr static
bool value = detail::is_variant_like_<T>::value;
Synopsis
Declared in <fmt/ranges.h>
template<
typename It,
typename Sentinel,
typename Char = char>
struct join_view
: /* implementation-defined */
Base Classes
Name |
Description |
|
Member Functions
Name |
|
Non-Member Functions
Name |
Description |
Returns a view that formats the iterator range |
|
Returns a view that formats |
|
Returns an object that formats |
Synopsis
Declared in <fmt/ranges.h>
join_view(
It b,
Sentinel e,
basic_string_view<Char> s);
Synopsis
Declared in <fmt/ranges.h>
It begin;
Synopsis
Declared in <fmt/ranges.h>
Sentinel end;
Synopsis
Declared in <fmt/ranges.h>
Synopsis
Declared in <fmt/format.h>
class loc_value;
Member Functions
Name |
Description |
|
Constructors |
Constructors
Synopses
Declared in <fmt/format.h>
Construct from T
template<typename T>
loc_value(T value);
Construct from T
template<typename T>
loc_value(T value);
Construct from T
Synopsis
Declared in <fmt/format.h>
template<typename T>
loc_value(T value);
Parameters
Name |
Description |
value |
The object to construct from |
Construct from T
Synopsis
Declared in <fmt/format.h>
template<typename T>
loc_value(T value);
Parameters
Name |
Description |
value |
The object to construct from |
Synopsis
Declared in <fmt/format.h>
template<typename Visitor>
decltype(vis(0))
visit(Visitor&& vis);
Synopsis
Declared in <fmt/base.h>
class locale_ref;
Member Functions
Name |
Description |
|
Constructors |
Conversion to |
Constructors
Synopses
Declared in <fmt/base.h>
Default constructor
constexpr
locale_ref();
Construct from Locale
template<typename Locale>
requires (sizeof(Locale::collate) != 0)
locale_ref(Locale const& loc);
Default constructor
Synopsis
Declared in <fmt/base.h>
constexpr
locale_ref();
Construct from Locale
Synopsis
Declared in <fmt/base.h>
template<typename Locale>
requires (sizeof(Locale::collate) != 0)
locale_ref(Locale const& loc);
Parameters
Name |
Description |
loc |
The object to copy construct from |
Synopsis
Declared in <fmt/base.h>
template<typename Locale>
Locale
get() const;
Conversion to bool
Synopsis
Declared in <fmt/base.h>
explicit
operator bool() const noexcept;
Return Value
The object converted to bool
Synopsis
Declared in <fmt/base.h>
struct monostate;
Member Functions
Name |
Description |
|
Default constructor |
Default constructor
Synopsis
Declared in <fmt/base.h>
constexpr
monostate();
Synopsis
Declared in <fmt/chrono.h>
class month;
Member Functions
Name |
Description |
|
Constructors |
Conversion to |
Constructors
Synopses
Synopsis
Declared in <fmt/chrono.h>
constexpr
month() = default;
Construct from unsigned int
Synopsis
Declared in <fmt/chrono.h>
constexpr
explicit
month(unsigned int m) noexcept;
Parameters
Name |
Description |
m |
The value to construct from |
Conversion to unsigned int
Synopsis
Declared in <fmt/chrono.h>
constexpr
explicit
operator unsigned int() const noexcept;
Return Value
The object converted to unsigned int
Synopsis
Declared in <fmt/format.h>
template<
typename T,
typename Char = char>
struct nested_formatter;
Member Functions
Name |
Description |
|
Default constructor |
Derived Classes
Name |
Description |
Default constructor
Synopsis
Declared in <fmt/format.h>
constexpr
nested_formatter();
Synopsis
Declared in <fmt/format.h>
nested_view<T, Char>
nested(T const& value) const;
Synopsis
Declared in <fmt/format.h>
constexpr
Char const*
parse(parse_context<Char>& ctx);
Synopsis
Declared in <fmt/format.h>
template<
typename FormatContext,
typename F>
decltype(ctx.out())
write_padded(
FormatContext& ctx,
F write) const;
Synopsis
Declared in <fmt/format.h>
template<
typename T,
typename Char>
struct nested_view;
Synopsis
Declared in <fmt/format.h>
formatter<T, Char> const* fmt;
Synopsis
Declared in <fmt/format.h>
T const* value;
Parsing context consisting of a format string range being parsed and an argument counter for automatic indexing.
Synopsis
Declared in <fmt/base.h>
template<typename Char = char>
class parse_context;
Types
Name |
Member Functions
Name |
Description |
|
|
Advances the begin iterator to |
|
Returns an iterator to the beginning of the format string range being parsed. |
|
Reports an error if using the automatic argument indexing; otherwise switches to the manual indexing. |
|
Returns an iterator past the end of the format string range being parsed. |
|
Reports an error if using the manual argument indexing; otherwise returns the next argument index and switches to the automatic indexing. |
Synopsis
Declared in <fmt/base.h>
using char_type = Char;
Synopsis
Declared in <fmt/base.h>
using iterator = Char const*;
Synopsis
Declared in <fmt/base.h>
constexpr
explicit
parse_context(
basic_string_view<Char> fmt,
int next_arg_id = 0);
Advances the begin iterator to it
.
Synopsis
Declared in <fmt/base.h>
constexpr
void
advance_to(iterator it);
Returns an iterator to the beginning of the format string range being parsed.
Synopsis
Declared in <fmt/base.h>
constexpr
iterator
begin() const noexcept;
Reports an error if using the automatic argument indexing; otherwise switches to the manual indexing.
Synopses
Declared in <fmt/base.h>
constexpr
void
check_arg_id(basic_string_view<Char>);
Reports an error if using the automatic argument indexing; otherwise switches to the manual indexing.
constexpr
void
check_arg_id(int id);
Synopsis
Declared in <fmt/base.h>
constexpr
void
check_arg_id(basic_string_view<Char>);
Reports an error if using the automatic argument indexing; otherwise switches to the manual indexing.
Synopsis
Declared in <fmt/base.h>
constexpr
void
check_arg_id(int id);
Synopsis
Declared in <fmt/base.h>
constexpr
void
check_dynamic_spec(int arg_id);
Returns an iterator past the end of the format string range being parsed.
Synopsis
Declared in <fmt/base.h>
constexpr
iterator
end() const noexcept;
Return Value
an iterator past the end of the format string range being parsed.
Reports an error if using the manual argument indexing; otherwise returns the next argument index and switches to the automatic indexing.
Synopsis
Declared in <fmt/base.h>
constexpr
int
next_arg_id();
Synopsis
Declared in <fmt/base.h>
template<>
class parse_context<char>;
Types
Name |
Member Functions
Synopsis
Declared in <fmt/base.h>
using char_type = char;
Synopsis
Declared in <fmt/base.h>
using iterator = char const*;
Synopsis
Declared in <fmt/base.h>
constexpr
explicit
parse_context(
basic_string_view<char> fmt,
int next_arg_id = 0);
Synopsis
Declared in <fmt/base.h>
constexpr
void
advance_to(iterator it);
Synopsis
Declared in <fmt/base.h>
constexpr
iterator
begin() const noexcept;
Synopses
Declared in <fmt/base.h>
constexpr
void
check_arg_id(basic_string_view<char>);
constexpr
void
check_arg_id(int id);
Synopsis
Declared in <fmt/base.h>
constexpr
void
check_arg_id(basic_string_view<char>);
Synopsis
Declared in <fmt/base.h>
constexpr
void
check_arg_id(int id);
Synopsis
Declared in <fmt/base.h>
constexpr
void
check_dynamic_spec(int arg_id);
Synopsis
Declared in <fmt/base.h>
constexpr
iterator
end() const noexcept;
Synopsis
Declared in <fmt/base.h>
constexpr
int
next_arg_id();
Synopsis
Declared in <fmt/std.h>
class path
: public std::filesystem::path
Base Classes
Name |
Description |
|
Member Functions
Synopsis
Declared in <fmt/std.h>
std::string
display_string() const;
Synopsis
Declared in <fmt/std.h>
std::string
generic_display_string() const;
Synopsis
Declared in <fmt/std.h>
std::string
generic_system_string() const;
Synopsis
Declared in <fmt/std.h>
std::string
system_string() const;
Synopsis
Declared in <fmt/ranges.h>
template<
typename T,
typename Char,
typename Enable = void>
struct range_format_kind
: conditional_t<is_range<T, Char>::value, /* implementation-defined */, std::integral_constant<range_format, range_format::disabled>>
Base Classes
Synopsis
Declared in <fmt/ranges.h>
template<
typename T,
typename Char,
typename Enable = void>
struct range_formatter;
Synopsis
Declared in <fmt/ranges.h>
template<
typename T,
typename Char>
requires conjunction<std::is_same<T, remove_cvref_t<T>>,
is_formattable<T, Char>>::value
struct range_formatter<T, Char>;
Member Functions
Name |
Description |
|
Default constructor |
Default constructor
Synopsis
Declared in <fmt/ranges.h>
constexpr
range_formatter();
Synopsis
Declared in <fmt/ranges.h>
template<
typename R,
typename FormatContext>
decltype(ctx.out())
format(
R&& range,
FormatContext& ctx) const;
Synopsis
Declared in <fmt/ranges.h>
constexpr
Char const*
parse(parse_context<Char>& ctx);
Synopsis
Declared in <fmt/ranges.h>
constexpr
void
set_brackets(
basic_string_view<Char> open,
basic_string_view<Char> close);
Synopsis
Declared in <fmt/ranges.h>
constexpr
void
set_separator(basic_string_view<Char> sep);
Synopsis
Declared in <fmt/ranges.h>
constexpr
/* implementation-defined */&
underlying();
Synopsis
Declared in <fmt/color.h>
struct rgb;
Member Functions
Name |
Description |
|
Constructors |
Synopses
Synopsis
Declared in <fmt/color.h>
constexpr
rgb();
Construct from color
Synopsis
Declared in <fmt/color.h>
constexpr
rgb(color hex);
Parameters
Name |
Description |
hex |
The object to construct from |
Construct from uint32_t
Synopsis
Declared in <fmt/color.h>
constexpr
rgb(uint32_t hex);
Parameters
Name |
Description |
hex |
The object to construct from |
Synopsis
Declared in <fmt/color.h>
constexpr
rgb(
uint8_t r_,
uint8_t g_,
uint8_t b_);
Synopsis
Declared in <fmt/color.h>
uint8_t b;
Synopsis
Declared in <fmt/color.h>
uint8_t g;
Synopsis
Declared in <fmt/color.h>
uint8_t r;
Synopsis
Declared in <fmt/base.h>
template<typename Char = char>
struct runtime_format_string;
Data Members
Name |
Non-Member Functions
Name |
Description |
Creates a runtime format string. |
Synopsis
Declared in <fmt/base.h>
Synopsis
Declared in <fmt/compile.h>
template<size_t N>
class static_format_result;
Member Functions
Name |
|
Synopsis
Declared in <fmt/compile.h>
template<
typename S,
typename... T>
constexpr
explicit
static_format_result(
S const& fmt,
T...&&... args);
Synopsis
Declared in <fmt/compile.h>
char const*
c_str() const;
Synopsis
Declared in <fmt/compile.h>
fmt::string_view
str() const;
Synopsis
Declared in <fmt/format.h>
class string_buffer;
Member Functions
Name |
Description |
|
Default constructor |
Conversion to |
Default constructor
Synopsis
Declared in <fmt/format.h>
string_buffer();
Synopsis
Declared in <fmt/format.h>
std::string&
str();
Conversion to writer
Synopsis
Declared in <fmt/format.h>
operator writer();
Return Value
The object converted to writer
A text style consisting of foreground and background colors and emphasis.
Synopsis
Declared in <fmt/color.h>
class text_style;
Member Functions
Name |
Description |
|
Construct from |
Bitwise disjunction assignment operator |
|
Equality operator |
|
Inequality operator |
Friends
Name |
Description |
Creates a text style from the background color. |
|
Creates a text style from the foreground (text) color. |
|
Bitwise disjunction operator |
Non-Member Functions
Name |
Description |
Formats arguments and returns the result as a string using ANSI escape sequences to specify text formatting. |
|
Bitwise disjunction operator |
|
Formats a string and prints it to stdout using ANSI escape sequences to specify text formatting. |
Construct from emphasis
Synopsis
Declared in <fmt/color.h>
constexpr
text_style(emphasis em = emphasis()) noexcept;
Parameters
Name |
Description |
em |
The object to construct from |
Synopsis
Declared in <fmt/color.h>
constexpr
/* implementation-defined */
get_background() const noexcept;
Synopsis
Declared in <fmt/color.h>
constexpr
emphasis
get_emphasis() const noexcept;
Synopsis
Declared in <fmt/color.h>
constexpr
/* implementation-defined */
get_foreground() const noexcept;
Synopsis
Declared in <fmt/color.h>
constexpr
bool
has_background() const noexcept;
Synopsis
Declared in <fmt/color.h>
constexpr
bool
has_emphasis() const noexcept;
Synopsis
Declared in <fmt/color.h>
constexpr
bool
has_foreground() const noexcept;
Bitwise disjunction assignment operator
Synopsis
Declared in <fmt/color.h>
constexpr
text_style&
operator|=(text_style rhs);
Return Value
Reference to the current object
Parameters
Name |
Description |
rhs |
The right operand |
Equality operator
Synopsis
Declared in <fmt/color.h>
constexpr
bool
operator==(text_style rhs) const noexcept;
Return Value
true
if the objects are equal, false
otherwise
Parameters
Name |
Description |
rhs |
The right operand |
Inequality operator
Synopsis
Declared in <fmt/color.h>
constexpr
bool
operator!=(text_style rhs) const noexcept;
Return Value
true
if the objects are not equal, false
otherwise
Parameters
Name |
Description |
rhs |
The right operand |
Synopsis
Declared in <fmt/ranges.h>
template<
typename Tuple,
typename Char>
struct tuple_join_view
: /* implementation-defined */
Base Classes
Name |
Description |
|
Member Functions
Name |
Description |
|
Constructor |
Non-Member Functions
Name |
Description |
Returns an object that formats |
Constructor
Synopsis
Declared in <fmt/ranges.h>
tuple_join_view(
Tuple const& t,
basic_string_view<Char> s);
Parameters
Name |
Description |
t |
The object to copy construct from |
s |
An implementation of |
Synopsis
Declared in <fmt/ranges.h>
Synopsis
Declared in <fmt/ranges.h>
Tuple const& tuple;
Synopsis
Declared in <fmt/printf.h>
template<typename Char>
struct vprintf_args;
Types
Name |
Synopsis
Declared in <fmt/printf.h>
Synopsis
Declared in <fmt/chrono.h>
class weekday;
Member Functions
Name |
Description |
|
Constructors |
Constructors
Synopses
Synopsis
Declared in <fmt/chrono.h>
constexpr
weekday() = default;
Construct from unsigned int
Synopsis
Declared in <fmt/chrono.h>
constexpr
explicit
weekday(unsigned int wd) noexcept;
Parameters
Name |
Description |
wd |
The value to construct from |
Synopsis
Declared in <fmt/chrono.h>
constexpr
unsigned int
c_encoding() const noexcept;
Synopsis
Declared in <fmt/format.h>
class writer;
Member Functions
Synopses
Synopsis
Declared in <fmt/format.h>
writer(/* implementation-defined */& buf);
Parameters
Name |
Description |
buf |
The object to copy construct from |
Construct from FILE
Synopsis
Declared in <fmt/format.h>
writer(FILE* f);
Parameters
Name |
Description |
f |
The object to construct from |
Formats args
according to specifications in fmt
and writes the output to the file.
Synopsis
Declared in <fmt/format.h>
template<typename... T>
void
print(
format_string<T...> fmt,
T...&&... args);
Synopsis
Declared in <fmt/chrono.h>
class year;
Member Functions
Name |
Description |
|
Constructors |
Conversion to |
Constructors
Synopses
Synopsis
Declared in <fmt/chrono.h>
constexpr
year() = default;
Construct from int
Synopsis
Declared in <fmt/chrono.h>
constexpr
explicit
year(int y) noexcept;
Parameters
Name |
Description |
y |
The value to construct from |
Conversion to int
Synopsis
Declared in <fmt/chrono.h>
constexpr
explicit
operator int() const noexcept;
Return Value
The object converted to int
Synopsis
Declared in <fmt/chrono.h>
class year_month_day;
Member Functions
Name |
Description |
|
Constructors |
Constructors
Synopses
Declared in <fmt/chrono.h>
Default constructor
constexpr
year_month_day() = default;
constexpr
year_month_day(
year const& y,
month const& m,
day const& d) noexcept;
Default constructor
Synopsis
Declared in <fmt/chrono.h>
constexpr
year_month_day() = default;
Synopsis
Synopsis
Declared in <fmt/chrono.h>
constexpr
fmt::day
day() const noexcept;
Synopsis
Declared in <fmt/chrono.h>
constexpr
fmt::month
month() const noexcept;
Synopsis
Declared in <fmt/chrono.h>
constexpr
fmt::year
year() const noexcept;
Synopsis
Declared in <fmt/format.h>
enum Unnamed enum;
Members
Name |
|
Synopsis
Declared in <fmt/base.h>
enum class align : int;
Members
Name |
|
|
|
|
|
Synopsis
Declared in <fmt/base.h>
enum class arg_id_kind : int;
Members
Name |
|
|
|
Synopsis
Declared in <fmt/color.h>
enum class color : uint32_t;
Members
Name |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Synopsis
Declared in <fmt/color.h>
enum class emphasis : uint8_t;
Members
Name |
|
|
|
|
|
|
|
|
Non-Member Functions
Name |
Description |
Bitwise disjunction operator |
Synopsis
Declared in <fmt/base.h>
enum class presentation_type : unsigned char;
Members
Name |
|
|
|
|
|
|
|
|
|
|
|
|
|
Synopsis
Declared in <fmt/ranges.h>
enum class range_format : int;
Members
Name |
|
|
|
|
|
|
Synopsis
Declared in <fmt/base.h>
enum class sign : int;
Members
Name |
|
|
|
|
Synopsis
Declared in <fmt/color.h>
enum class terminal_color : uint8_t;
Members
Name |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Synopses
Declared in <fmt/compile.h>
template</* implementation-defined */ S>
constexpr
auto
Unnamed function();
template</* implementation-defined */ Str>
constexpr
auto
Unnamed function();
Synopsis
Declared in <fmt/format.h>
template</* implementation-defined */ S>
constexpr
auto
Unnamed function();
Synopsis
Declared in <fmt/compile.h>
template</* implementation-defined */ Str>
constexpr
auto
Unnamed function();
Returns a named argument to be used in a formatting function. It should only be used in a call to a formatting function.
Synopsis
Declared in <fmt/base.h>
template<
typename Char,
typename T>
/* implementation-defined */
arg(
Char const* name,
T const& arg);
Description
Example:
fmt::print("The answer is {answer}.", fmt::arg("answer", 42));
Synopsis
Declared in <fmt/base.h>
[[noreturn]]
void
assert_fail(
char const* file,
int line,
char const* message);
Creates a text style from the background color.
Synopsis
Declared in <fmt/color.h>
constexpr
text_style
bg(/* implementation-defined */ background) noexcept;
Return Value
A text style consisting of foreground and background colors and emphasis.
Creates a text style from the foreground (text) color.
Synopsis
Declared in <fmt/color.h>
constexpr
text_style
fg(/* implementation-defined */ foreground) noexcept;
Return Value
A text style consisting of foreground and background colors and emphasis.
format
overloads
Synopses
Declared in <fmt/color.h>
Formats args
according to specifications in fmt
and returns the result as a string.
template<typename... T>
[[nodiscard, always_inline]]
std::string
format(
format_string<T...> fmt,
T...&&... args);
template<typename... T>
std::wstring
format(
wformat_string<T...> fmt,
T...&&... args);
template<
typename S,
typename... T>
[[always_inline]]
constexpr
std::basic_string<S::char_type>
format(
S const&,
T...&&... args);
template<
typename CompiledFormat,
typename... T,
typename Char = CompiledFormat::char_type>
[[always_inline]]
constexpr
std::basic_string<Char>
format(
CompiledFormat const& cf,
T const...&... args);
template<
typename S,
typename... T,
typename Char = /* implementation-defined */>
std::basic_string<Char>
format(
S const& fmt,
T...&&... args);
template<typename... T>
[[always_inline]]
std::string
format(
locale_ref loc,
format_string<T...> fmt,
T...&&... args);
Formats arguments and returns the result as a string using ANSI escape sequences to specify text formatting.
template<typename... T>
std::string
format(
text_style ts,
format_string<T...> fmt,
T...&&... args);
template<typename... T>
std::wstring
format(
text_style ts,
wformat_string<T...> fmt,
T...&&... args);
template<
typename S,
typename... T,
typename Char = /* implementation-defined */>
std::basic_string<Char>
format(
locale_ref loc,
S const& fmt,
T...&&... args);
Formats args
according to specifications in fmt
and returns the result as a string.
Synopsis
Declared in <fmt/format.h>
template<typename... T>
[[nodiscard, always_inline]]
std::string
format(
format_string<T...> fmt,
T...&&... args);
Description
Example:
#include <fmt/format.h> std::string message = fmt::format("The answer is {}.", 42);
Synopsis
Declared in <fmt/xchar.h>
template<typename... T>
std::wstring
format(
wformat_string<T...> fmt,
T...&&... args);
Synopsis
Declared in <fmt/compile.h>
template<
typename S,
typename... T>
[[always_inline]]
constexpr
std::basic_string<S::char_type>
format(
S const&,
T...&&... args);
Synopsis
Declared in <fmt/compile.h>
template<
typename CompiledFormat,
typename... T,
typename Char = CompiledFormat::char_type>
[[always_inline]]
constexpr
std::basic_string<Char>
format(
CompiledFormat const& cf,
T const...&... args);
Synopsis
Declared in <fmt/xchar.h>
template<
typename S,
typename... T,
typename Char = /* implementation-defined */>
std::basic_string<Char>
format(
S const& fmt,
T...&&... args);
Synopsis
Declared in <fmt/format.h>
template<typename... T>
[[always_inline]]
std::string
format(
locale_ref loc,
format_string<T...> fmt,
T...&&... args);
Formats arguments and returns the result as a string using ANSI escape sequences to specify text formatting.
Synopsis
Declared in <fmt/color.h>
template<typename... T>
std::string
format(
text_style ts,
format_string<T...> fmt,
T...&&... args);
Description
Example: