fmt
Loading...
Searching...
No Matches
fmt::BasicFormatArgs< Context > Class Template Referenceexport
module fmt

Public Types

using FormatArg = BasicFormatArg<Context>
template<int NUM_ARGS, int NUM_NAMED_ARGS, Ullong DESC>
using Store

Public Member Functions

template<int NUM_ARGS, int NUM_NAMED_ARGS, Ullong DESC>
requires (NUM_ARGS <= detail::kMaxPackedArgs)
constexpr BasicFormatArgs (const Store< NUM_ARGS, NUM_NAMED_ARGS, DESC > &s)
template<int NUM_ARGS, int NUM_NAMED_ARGS, Ullong DESC>
requires (NUM_ARGS > detail::kMaxPackedArgs)
constexpr BasicFormatArgs (const Store< NUM_ARGS, NUM_NAMED_ARGS, DESC > &s)
constexpr BasicFormatArgs (const FormatArg *args, int count, bool has_named=false)
constexpr auto get (int id) const -> FormatArg
template<typename Char>
auto get (BasicStringView< Char > name) const -> FormatArg
template<typename Char>
constexpr auto getId (BasicStringView< Char > name) const -> int
auto maxSize () const -> int

Detailed Description

template<typename Context>
class fmt::BasicFormatArgs< Context >

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(fmt::StringView fmt, fmt::FormatArgs args);  // OK
fmt::FormatArgs args = fmt::makeFormatArgs();  // Dangling

reference

Member Typedef Documentation

◆ Store

template<typename Context>
template<int NUM_ARGS, int NUM_NAMED_ARGS, Ullong DESC>
using fmt::BasicFormatArgs< Context >::Store
Initial value:
detail::
FormatArgStore<Context, NUM_ARGS, NUM_NAMED_ARGS, DESC>

Constructor & Destructor Documentation

◆ BasicFormatArgs() [1/2]

template<typename Context>
template<int NUM_ARGS, int NUM_NAMED_ARGS, Ullong DESC>
requires (NUM_ARGS <= detail::kMaxPackedArgs)
fmt::BasicFormatArgs< Context >::BasicFormatArgs ( const Store< NUM_ARGS, NUM_NAMED_ARGS, DESC > & s)
inlineconstexpr

Constructs a basic_format_args object from format_arg_store.

◆ BasicFormatArgs() [2/2]

template<typename Context>
fmt::BasicFormatArgs< Context >::BasicFormatArgs ( const FormatArg * args,
int count,
bool has_named = false )
inlineconstexpr

Constructs a basic_format_args object from a dynamic list of arguments.

Member Function Documentation

◆ get()

template<typename Context>
auto fmt::BasicFormatArgs< Context >::get ( int id) const -> FormatArg
inlineconstexpr

Returns the argument with the specified id.


The documentation for this class was generated from the following file:
  • /home/mccakit/desktop/mccakit-fmt/fmt/src/fmt/iface/base.cppm