fmt
Loading...
Searching...
No Matches
fmt::BasicPrintfContext< Char > Class Template Referenceexport
module fmt

Public Types

using char_type = Char

Public Member Functions

 BasicPrintfContext (BasicAppender< Char > out, BasicFormatArgs< BasicPrintfContext > args)
auto out () -> BasicAppender< Char >
auto advanceTo (BasicAppender< Char >) -> void
auto locale () -> LocaleRef
auto arg (int id) const -> BasicFormatArg< BasicPrintfContext >

Static Public Attributes

static constexpr int kBuiltinTypes = 1

Detailed Description

template<typename Char>
class fmt::BasicPrintfContext< Char >

The formatting context used by the printf functions.

Differs from FormatContext in that it is not locale-aware and supports only the built-in types.

Template Parameters
Charthe character type, char or wchar_t.

Constructor & Destructor Documentation

◆ BasicPrintfContext()

template<typename Char>
fmt::BasicPrintfContext< Char >::BasicPrintfContext ( BasicAppender< Char > out,
BasicFormatArgs< BasicPrintfContext< Char > > args )
inline

Constructs a context writing to out.

Parameters
outthe output iterator to write to.
argsthe arguments, which are stored by reference and must outlive the context.

Member Function Documentation

◆ advanceTo()

template<typename Char>
auto fmt::BasicPrintfContext< Char >::advanceTo ( BasicAppender< Char > ) -> void
inline

Does nothing: the appender tracks its own position.

◆ arg()

template<typename Char>
auto fmt::BasicPrintfContext< Char >::arg ( int id) const -> BasicFormatArg< BasicPrintfContext >
inline

Returns the argument at index id, or a monostate argument if there is none.

◆ locale()

template<typename Char>
auto fmt::BasicPrintfContext< Char >::locale ( ) -> LocaleRef
inline

Returns an empty locale: printf formatting is not locale-aware.

◆ out()

template<typename Char>
auto fmt::BasicPrintfContext< Char >::out ( ) -> BasicAppender< Char >
inline

Returns the output iterator being written to.


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