Format string wrapper that checks the format at compile time.

Synopsis

Declared in <tinyformat.h>

template<unsigned int num_params>
struct FormatStringCheck;

Description

Added for Bitcoin Core. Unlike ConstevalFormatString this supports RuntimeFormat‐wrapped std::string for runtime string formatting without compile time checks.

Member Functions

Name

Description

FormatStringCheck [constructor]

Constructors

operator char const*

Access the underlying format string.

Data Members

Name

Description

fmt

Validated null‐terminated format string.

Non-Member Functions

Name

Description

format

Format list of arguments according to the given format string and return the result as a string.

printf

Format list of arguments to std::cout, according to the given format string

printfln

Format list of arguments to std::cout, then append a newline.

Created with MrDocs