Template Class basic_printf_context

Class Documentation

template<typename OutputIt, typename Char>
class basic_printf_context

This template formats data and writes the output to a writer.

Public Types

template<>
using char_type = Char

The character type for the output.

template<>
using format_arg = basic_format_arg<basic_printf_context>
template<>
using formatter_type = printf_formatter<T>

Public Functions

basic_printf_context(OutputIt out, basic_string_view<char_type> format_str, basic_format_args<basic_printf_context> args)

Constructs a printf_context object. References to the arguments and the writer are stored in the context object so make sure they have appropriate lifetimes.

OutputIt out()
void advance_to(OutputIt it)
format_arg arg(int id) const
basic_format_parse_context<Char> &parse_context()
void on_error(const char *message)
template<typename ArgFormatter = printf_arg_formatter<buffer_range<Char>>>
OutputIt format()

Formats stored arguments and writes the output to the range.