forked from fmtlib/fmt
Update docs
This commit is contained in:
@ -69,6 +69,9 @@ Argument Lists
|
|||||||
.. doxygenclass:: fmt::format_arg_store
|
.. doxygenclass:: fmt::format_arg_store
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: fmt::dynamic_format_arg_store
|
||||||
|
:members:
|
||||||
|
|
||||||
.. doxygenclass:: fmt::basic_format_args
|
.. doxygenclass:: fmt::basic_format_args
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
|
@ -1425,7 +1425,7 @@ inline detail::named_arg<Char, T> arg(const Char* name, const T& arg) {
|
|||||||
/**
|
/**
|
||||||
\rst
|
\rst
|
||||||
A dynamic version of `fmt::format_arg_store<>`.
|
A dynamic version of `fmt::format_arg_store<>`.
|
||||||
It's equipped with a storage to potentially temporary objects which lifetime
|
It's equipped with a storage to potentially temporary objects which lifetimes
|
||||||
could be shorter than the format arguments object.
|
could be shorter than the format arguments object.
|
||||||
|
|
||||||
It can be implicitly converted into `~fmt::basic_format_args` for passing
|
It can be implicitly converted into `~fmt::basic_format_args` for passing
|
||||||
@ -1508,8 +1508,8 @@ class dynamic_format_arg_store
|
|||||||
Adds an argument into the dynamic store for later passing to a formating
|
Adds an argument into the dynamic store for later passing to a formating
|
||||||
function.
|
function.
|
||||||
|
|
||||||
Note that custom types and string types (but not string views!) are copied
|
Note that custom types and string types (but not string views) are copied
|
||||||
into the store with dynamic memory (in addition to resizing vector).
|
into the store dynamically allocating memory if necessary.
|
||||||
|
|
||||||
**Example**::
|
**Example**::
|
||||||
|
|
||||||
@ -1531,9 +1531,10 @@ class dynamic_format_arg_store
|
|||||||
\rst
|
\rst
|
||||||
Adds a reference to the argument into the dynamic store for later passing to
|
Adds a reference to the argument into the dynamic store for later passing to
|
||||||
a formating function. Supports named arguments wrapped in
|
a formating function. Supports named arguments wrapped in
|
||||||
std::reference_wrapper (via std::ref()/std::cref()).
|
``std::reference_wrapper`` via ``std::ref()``/``std::cref()``.
|
||||||
|
|
||||||
**Example**::
|
**Example**::
|
||||||
|
|
||||||
fmt::dynamic_format_arg_store<fmt::format_context> store;
|
fmt::dynamic_format_arg_store<fmt::format_context> store;
|
||||||
char str[] = "1234567890";
|
char str[] = "1234567890";
|
||||||
store.push_back(std::cref(str));
|
store.push_back(std::cref(str));
|
||||||
@ -1558,7 +1559,7 @@ class dynamic_format_arg_store
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Adds named argument into the dynamic store for later passing to a formating
|
Adds named argument into the dynamic store for later passing to a formating
|
||||||
function. std::reference_wrapper is supported to avoid copying of the
|
function. ``std::reference_wrapper`` is supported to avoid copying of the
|
||||||
argument.
|
argument.
|
||||||
*/
|
*/
|
||||||
template <typename T>
|
template <typename T>
|
||||||
@ -1581,8 +1582,10 @@ class dynamic_format_arg_store
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
\rst
|
||||||
Reserves space to store at least *new_cap* arguments including
|
Reserves space to store at least *new_cap* arguments including
|
||||||
*new_cap_named* named arguments.
|
*new_cap_named* named arguments.
|
||||||
|
\endrst
|
||||||
*/
|
*/
|
||||||
void reserve(size_t new_cap, size_t new_cap_named) {
|
void reserve(size_t new_cap, size_t new_cap_named) {
|
||||||
FMT_ASSERT(new_cap >= new_cap_named,
|
FMT_ASSERT(new_cap >= new_cap_named,
|
||||||
|
Reference in New Issue
Block a user