WPILibC++ 2023.4.3-108-ge5452e3
|
Go to the source code of this file.
Classes | |
struct | printf_formatter< T > |
class | basic_printf_parse_context< Char > |
class | basic_printf_context< OutputIt, Char > |
struct | int_checker< IsSigned > |
struct | int_checker< true > |
class | printf_precision_handler |
class | is_zero_int |
struct | make_unsigned_or_bool< T > |
struct | make_unsigned_or_bool< bool > |
class | arg_converter< T, Context > |
class | char_converter< Context > |
struct | get_cstring< Char > |
class | printf_width_handler< Char > |
class | printf_arg_formatter< OutputIt, Char > |
Typedefs | |
template<typename Char > | |
using | basic_printf_context_t = basic_printf_context< detail::buffer_appender< Char >, Char > |
using | printf_context = basic_printf_context_t< char > |
using | wprintf_context = basic_printf_context_t< wchar_t > |
using | printf_args = basic_format_args< printf_context > |
using | wprintf_args = basic_format_args< wprintf_context > |
Functions | |
template<typename T , typename Context , typename Char > | |
void | convert_arg (basic_format_arg< Context > &arg, Char type) |
template<typename Char > | |
void | parse_flags (basic_format_specs< Char > &specs, const Char *&it, const Char *end) |
template<typename Char , typename GetArg > | |
int | parse_header (const Char *&it, const Char *end, basic_format_specs< Char > &specs, GetArg get_arg) |
template<typename Char , typename Context > | |
void | vprintf (buffer< Char > &buf, basic_string_view< Char > format, basic_format_args< Context > args) |
template<typename... T> | |
auto | make_printf_args (const T &... args) -> format_arg_store< printf_context, T... > |
\rst Constructs an ~fmtformat_arg_store object that contains references to arguments and can be implicitly converted to ~fmtprintf_args . More... | |
template<typename... T> | |
auto | make_wprintf_args (const T &... args) -> format_arg_store< wprintf_context, T... > |
\rst Constructs an ~fmtformat_arg_store object that contains references to arguments and can be implicitly converted to ~fmtwprintf_args . More... | |
template<typename S , typename Char = char_t<S>> | |
auto | vsprintf (const S &fmt, basic_format_args< basic_printf_context_t< type_identity_t< Char > > > args) -> std::basic_string< Char > |
template<typename S , typename... T, typename Char = enable_if_t<detail::is_string<S>::value, char_t<S>>> | |
auto | sprintf (const S &fmt, const T &... args) -> std::basic_string< Char > |
\rst Formats arguments and returns the result as a string. More... | |
template<typename S , typename Char = char_t<S>> | |
auto | vfprintf (std::FILE *f, const S &fmt, basic_format_args< basic_printf_context_t< type_identity_t< Char > > > args) -> int |
template<typename S , typename... T, typename Char = char_t<S>> | |
auto | fprintf (std::FILE *f, const S &fmt, const T &... args) -> int |
\rst Prints formatted data to the file f. More... | |
template<typename S , typename Char = char_t<S>> | |
auto | vprintf (const S &fmt, basic_format_args< basic_printf_context_t< type_identity_t< Char > > > args) -> int |
template<typename S , typename... T, FMT_ENABLE_IF(detail::is_string< S >::value) > | |
auto | printf (const S &fmt, const T &... args) -> int |
\rst Prints formatted data to stdout . More... | |
using basic_printf_context_t = basic_printf_context<detail::buffer_appender<Char>, Char> |
using printf_args = basic_format_args<printf_context> |
using printf_context = basic_printf_context_t<char> |
using wprintf_args = basic_format_args<wprintf_context> |
using wprintf_context = basic_printf_context_t<wchar_t> |
void convert_arg | ( | basic_format_arg< Context > & | arg, |
Char | type | ||
) |
|
inline |
\rst Prints formatted data to the file f.
Example**::
fmt::fprintf(stderr, "Don't %s!", "panic"); \endrst
|
inline |
\rst Constructs an ~fmtformat_arg_store
object that contains references to arguments and can be implicitly converted to ~fmtprintf_args
.
\endrst
|
inline |
\rst Constructs an ~fmtformat_arg_store
object that contains references to arguments and can be implicitly converted to ~fmtwprintf_args
.
\endrst
void parse_flags | ( | basic_format_specs< Char > & | specs, |
const Char *& | it, | ||
const Char * | end | ||
) |
int parse_header | ( | const Char *& | it, |
const Char * | end, | ||
basic_format_specs< Char > & | specs, | ||
GetArg | get_arg | ||
) |
|
inline |
\rst Prints formatted data to stdout
.
Example**::
fmt::printf("Elapsed time: %.2f seconds", 1.23); \endrst
|
inline |
\rst Formats arguments and returns the result as a string.
Example**::
std::string message = fmt::sprintf("The answer is %d", 42); \endrst
|
inline |
void vprintf | ( | buffer< Char > & | buf, |
basic_string_view< Char > | format, | ||
basic_format_args< Context > | args | ||
) |
|
inline |
|
inline |