Template Class basic_format_args

Class Documentation

template<typename Context>
class fmt::v6::basic_format_args

A view of a collection of formatting arguments. To avoid lifetime issues it should only be used as a parameter type in type-erased functions such as vformat:

void vlog(string_view format_str, format_args args);  // OK
format_args args = make_format_args(42);  // Error: dangling reference

Public Types

using size_type = int
using format_arg = basic_format_arg<Context>

Public Functions

basic_format_args()
template<typename ...Args>
basic_format_args(const format_arg_store<Context, Args...> &store)

Constructs a basic_format_args object from ~fmt::format_arg_store.

basic_format_args(const dynamic_format_arg_store<Context> &store)

Constructs a basic_format_args object from ~fmt::dynamic_format_arg_store.

basic_format_args(const format_arg *args, int count)

Constructs a basic_format_args object from a dynamic set of arguments.

format_arg get(int index) const

Returns the argument at specified index.

int max_size() const

Public Members

const internal::value<Context> *values_
const format_arg *args_

Friends

friend class internal::arg_map< Context >