class basic_format_args

Declaration

template <typename Context>
class basic_format_args { /* full declaration omitted */ };

Description

\rstA 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(); // Error: dangling reference\endrst

Declared at: third_party/fmt/include/fmt/core.h:1857

Templates

Context

Method Overview

  • public constexpr basic_format_args<Context>()
  • public inline constexpr basic_format_args<Context>(const dynamic_format_arg_store<Context> & store)
  • public constexpr basic_format_args<Context>(const fmt::basic_format_args::format_arg * args, int count)
  • public template <typename... Args>inline constexpr basic_format_args<Context>(const format_arg_store<Context, Args...> & store)
  • public constexpr auto get(int id) const -> fmt::basic_format_args::format_arg
  • public template <typename Char>auto get(basic_string_view<Char> name) const -> fmt::basic_format_args::format_arg
  • public template <typename Char>auto get_id(basic_string_view<Char> name) const -> int
  • public auto max_size() const -> int

Methods

constexpr basic_format_args<Context>()

Declared at: third_party/fmt/include/fmt/core.h:1898

inline constexpr basic_format_args<Context>(
    const dynamic_format_arg_store<Context>&
        store)

Description

\rstConstructs a `basic_format_args` object from `~fmt::dynamic_format_arg_store`.\endrst

Declared at: third_party/fmt/include/fmt/core.h:1917

Parameters

const dynamic_format_arg_store<Context>& store

constexpr basic_format_args<Context>(
    const fmt::basic_format_args::format_arg*
        args,
    int count)

Description

\rstConstructs a `basic_format_args` object from a dynamic set of arguments.\endrst

Declared at: third_party/fmt/include/fmt/core.h:1926

Parameters

const fmt::basic_format_args::format_arg* args
int count

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

Description

\rstConstructs a `basic_format_args` object from `~fmt::format_arg_store`.\endrst

Declared at: third_party/fmt/include/fmt/core.h:1906

Templates

Args

Parameters

const format_arg_store<Context, Args...>& store

constexpr auto get(int id) const
    -> fmt::basic_format_args::format_arg

Description

Returns the argument with the specified id.

Declared at: third_party/fmt/include/fmt/core.h:1931

Parameters

int id

template <typename Char>
auto get(basic_string_view<Char> name) const
    -> fmt::basic_format_args::format_arg

Declared at: third_party/fmt/include/fmt/core.h:1945

Templates

Char

Parameters

basic_string_view<Char> name

template <typename Char>
auto get_id(basic_string_view<Char> name) const
    -> int

Declared at: third_party/fmt/include/fmt/core.h:1951

Templates

Char

Parameters

basic_string_view<Char> name

auto max_size() const -> int

Declared at: third_party/fmt/include/fmt/core.h:1961