20 General utilities library [utilities]

20.20 Formatting [format]

20.20.6 Arguments [format.arguments]

20.20.6.3 Class template basic_­format_­args [format.args]

namespace std {
  template<class Context>
  class basic_format_args {
    size_t size_;                               // exposition only
    const basic_format_arg<Context>* data_;     // exposition only

  public:
    basic_format_args() noexcept;

    template<class... Args>
      basic_format_args(const format-arg-store<Context, Args...>& store) noexcept;

    basic_format_arg<Context> get(size_t i) const noexcept;
  };
}
An instance of basic_­format_­args provides access to formatting arguments.
basic_format_args() noexcept;
Effects: Initializes size_­ with 0.
template<class... Args> basic_format_args(const format-arg-store<Context, Args...>& store) noexcept;
Effects: Initializes size_­ with sizeof...(Args) and data_­ with store.args.data().
basic_format_arg<Context> get(size_t i) const noexcept;
Returns: i < size_­ ? data_­[i] : basic_­format_­arg<Context>().
[Note
:
Implementations are encouraged to optimize the representation of basic_­format_­args for small number of formatting arguments by storing indices of type alternatives separately from values and packing the former.
— end note
]