Livox SDK API  V2.2.0
fmt::v5 Namespace Reference

Namespaces

 internal
 

Classes

struct  align_spec
 
class  arg_formatter
 
struct  arg_join
 
class  back_insert_range
 
class  basic_cstring_view
 
class  basic_format_arg
 
class  basic_format_args
 
class  basic_format_context
 
struct  basic_format_specs
 
class  basic_memory_buffer
 
class  basic_parse_context
 
class  basic_printf_context
 
struct  basic_printf_context_t
 
class  basic_string_view
 
class  basic_writer
 
struct  buffer_context
 
class  buffered_file
 
struct  char_t
 
struct  compile_string
 
struct  convert_to_int
 
struct  convert_to_int< T, Char, void >
 
struct  core_format_specs
 
class  dynamic_formatter
 
class  error_code
 
class  file
 
struct  float_spec_handler
 
class  format_arg_store
 
struct  format_args
 
struct  format_args_t
 
struct  format_context_t
 
class  format_error
 
struct  format_handler
 
class  format_int
 
struct  format_to_n_args
 
struct  format_to_n_context
 
struct  format_to_n_result
 
struct  formatter
 
struct  formatter< arg_join< It, Char >, Char >
 
struct  formatter< RangeT, Char, typename std::enable_if< fmt::is_range< RangeT >::value >::type >
 
struct  formatter< std::chrono::duration< Rep, Period >, Char >
 
struct  formatter< std::tm, Char >
 
struct  formatter< T, Char, typename std::enable_if< internal::format_type< typename buffer_context< Char >::type, T >::value >::type >
 
struct  formatter< T, Char, typename std::enable_if< internal::is_streamable< T, Char >::value &&!internal::format_type< typename buffer_context< Char >::type, T >::value >::type >
 
struct  formatter< TupleT, Char, typename std::enable_if< fmt::is_tuple_like< TupleT >::value >::type >
 
struct  formatting_base
 
struct  formatting_range
 
struct  formatting_tuple
 
struct  is_compile_string
 
struct  is_constructible
 
struct  is_contiguous
 
struct  is_contiguous< internal::basic_buffer< Char > >
 
struct  is_contiguous< std::basic_string< Char > >
 
struct  is_range
 
struct  is_tuple_like
 
struct  monostate
 
class  output_range
 
class  printf_arg_formatter
 
struct  printf_formatter
 
struct  rgb
 
class  system_error
 
class  text_style
 
class  u8string_view
 
struct  wformat_args
 

Typedefs

typedef basic_string_view< char > string_view
 
typedef basic_string_view< wchar_t > wstring_view
 
typedef basic_parse_context< char > format_parse_context
 
typedef basic_parse_context< wchar_t > wformat_parse_context
 
typedef basic_parse_context< char > parse_context
 
typedef basic_parse_context< wchar_t > wparse_context
 
typedef buffer_context< char >::type format_context
 
typedef buffer_context< wchar_t >::type wformat_context
 
typedef basic_writer< back_insert_range< internal::buffer > > writer
 
typedef basic_writer< back_insert_range< internal::wbuffer > > wwriter
 
typedef basic_memory_buffer< char > memory_buffer
 
typedef basic_memory_buffer< wchar_t > wmemory_buffer
 
typedef basic_format_specs< char > format_specs
 
typedef basic_cstring_view< char > cstring_view
 
typedef basic_cstring_view< wchar_t > wcstring_view
 
typedef basic_printf_context_t< internal::buffer >::type printf_context
 
typedef basic_printf_context_t< internal::wbuffer >::type wprintf_context
 
typedef basic_format_args< printf_contextprintf_args
 
typedef basic_format_args< wprintf_contextwprintf_args
 

Enumerations

enum  color : uint32_t {
  color::alice_blue = 0xF0F8FF, color::antique_white = 0xFAEBD7, color::aqua = 0x00FFFF, color::aquamarine = 0x7FFFD4,
  color::azure = 0xF0FFFF, color::beige = 0xF5F5DC, color::bisque = 0xFFE4C4, color::black = 0x000000,
  color::blanched_almond = 0xFFEBCD, color::blue = 0x0000FF, color::blue_violet = 0x8A2BE2, color::brown = 0xA52A2A,
  color::burly_wood = 0xDEB887, color::cadet_blue = 0x5F9EA0, color::chartreuse = 0x7FFF00, color::chocolate = 0xD2691E,
  color::coral = 0xFF7F50, color::cornflower_blue = 0x6495ED, color::cornsilk = 0xFFF8DC, color::crimson = 0xDC143C,
  color::cyan = 0x00FFFF, color::dark_blue = 0x00008B, color::dark_cyan = 0x008B8B, color::dark_golden_rod = 0xB8860B,
  color::dark_gray = 0xA9A9A9, color::dark_green = 0x006400, color::dark_khaki = 0xBDB76B, color::dark_magenta = 0x8B008B,
  color::dark_olive_green = 0x556B2F, color::dark_orange = 0xFF8C00, color::dark_orchid = 0x9932CC, color::dark_red = 0x8B0000,
  color::dark_salmon = 0xE9967A, color::dark_sea_green = 0x8FBC8F, color::dark_slate_blue = 0x483D8B, color::dark_slate_gray = 0x2F4F4F,
  color::dark_turquoise = 0x00CED1, color::dark_violet = 0x9400D3, color::deep_pink = 0xFF1493, color::deep_sky_blue = 0x00BFFF,
  color::dim_gray = 0x696969, color::dodger_blue = 0x1E90FF, color::fire_brick = 0xB22222, color::floral_white = 0xFFFAF0,
  color::forest_green = 0x228B22, color::fuchsia = 0xFF00FF, color::gainsboro = 0xDCDCDC, color::ghost_white = 0xF8F8FF,
  color::gold = 0xFFD700, color::golden_rod = 0xDAA520, color::gray = 0x808080, color::green = 0x008000,
  color::green_yellow = 0xADFF2F, color::honey_dew = 0xF0FFF0, color::hot_pink = 0xFF69B4, color::indian_red = 0xCD5C5C,
  color::indigo = 0x4B0082, color::ivory = 0xFFFFF0, color::khaki = 0xF0E68C, color::lavender = 0xE6E6FA,
  color::lavender_blush = 0xFFF0F5, color::lawn_green = 0x7CFC00, color::lemon_chiffon = 0xFFFACD, color::light_blue = 0xADD8E6,
  color::light_coral = 0xF08080, color::light_cyan = 0xE0FFFF, color::light_golden_rod_yellow = 0xFAFAD2, color::light_gray = 0xD3D3D3,
  color::light_green = 0x90EE90, color::light_pink = 0xFFB6C1, color::light_salmon = 0xFFA07A, color::light_sea_green = 0x20B2AA,
  color::light_sky_blue = 0x87CEFA, color::light_slate_gray = 0x778899, color::light_steel_blue = 0xB0C4DE, color::light_yellow = 0xFFFFE0,
  color::lime = 0x00FF00, color::lime_green = 0x32CD32, color::linen = 0xFAF0E6, color::magenta = 0xFF00FF,
  color::maroon = 0x800000, color::medium_aquamarine = 0x66CDAA, color::medium_blue = 0x0000CD, color::medium_orchid = 0xBA55D3,
  color::medium_purple = 0x9370DB, color::medium_sea_green = 0x3CB371, color::medium_slate_blue = 0x7B68EE, color::medium_spring_green = 0x00FA9A,
  color::medium_turquoise = 0x48D1CC, color::medium_violet_red = 0xC71585, color::midnight_blue = 0x191970, color::mint_cream = 0xF5FFFA,
  color::misty_rose = 0xFFE4E1, color::moccasin = 0xFFE4B5, color::navajo_white = 0xFFDEAD, color::navy = 0x000080,
  color::old_lace = 0xFDF5E6, color::olive = 0x808000, color::olive_drab = 0x6B8E23, color::orange = 0xFFA500,
  color::orange_red = 0xFF4500, color::orchid = 0xDA70D6, color::pale_golden_rod = 0xEEE8AA, color::pale_green = 0x98FB98,
  color::pale_turquoise = 0xAFEEEE, color::pale_violet_red = 0xDB7093, color::papaya_whip = 0xFFEFD5, color::peach_puff = 0xFFDAB9,
  color::peru = 0xCD853F, color::pink = 0xFFC0CB, color::plum = 0xDDA0DD, color::powder_blue = 0xB0E0E6,
  color::purple = 0x800080, color::rebecca_purple = 0x663399, color::red = 0xFF0000, color::rosy_brown = 0xBC8F8F,
  color::royal_blue = 0x4169E1, color::saddle_brown = 0x8B4513, color::salmon = 0xFA8072, color::sandy_brown = 0xF4A460,
  color::sea_green = 0x2E8B57, color::sea_shell = 0xFFF5EE, color::sienna = 0xA0522D, color::silver = 0xC0C0C0,
  color::sky_blue = 0x87CEEB, color::slate_blue = 0x6A5ACD, color::slate_gray = 0x708090, color::snow = 0xFFFAFA,
  color::spring_green = 0x00FF7F, color::steel_blue = 0x4682B4, color::tan = 0xD2B48C, color::teal = 0x008080,
  color::thistle = 0xD8BFD8, color::tomato = 0xFF6347, color::turquoise = 0x40E0D0, color::violet = 0xEE82EE,
  color::wheat = 0xF5DEB3, color::white = 0xFFFFFF, color::white_smoke = 0xF5F5F5, color::yellow = 0xFFFF00,
  color::yellow_green = 0x9ACD32
}
 
enum  terminal_color : uint8_t {
  terminal_color::black = 30, terminal_color::red, terminal_color::green, terminal_color::yellow,
  terminal_color::blue, terminal_color::magenta, terminal_color::cyan, terminal_color::white,
  terminal_color::bright_black = 90, terminal_color::bright_red, terminal_color::bright_green, terminal_color::bright_yellow,
  terminal_color::bright_blue, terminal_color::bright_magenta, terminal_color::bright_cyan, terminal_color::bright_white
}
 
enum  emphasis : uint8_t { emphasis::bold = 1, emphasis::italic = 1 << 1, emphasis::underline = 1 << 2, emphasis::strikethrough = 1 << 3 }
 
enum  char8_t : unsigned char
 
enum  { inline_buffer_size = 500 }
 
enum  alignment {
  ALIGN_DEFAULT, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTER,
  ALIGN_NUMERIC
}
 
enum  { SIGN_FLAG = 1, PLUS_FLAG = 2, MINUS_FLAG = 4, HASH_FLAG = 8 }
 

Functions

template<typename Period >
const char * get_units ()
 
template<>
const char * get_units< std::atto > ()
 
template<>
const char * get_units< std::femto > ()
 
template<>
const char * get_units< std::pico > ()
 
template<>
const char * get_units< std::nano > ()
 
template<>
const char * get_units< std::micro > ()
 
template<>
const char * get_units< std::milli > ()
 
template<>
const char * get_units< std::centi > ()
 
template<>
const char * get_units< std::deci > ()
 
template<>
const char * get_units< std::ratio< 1 > > ()
 
template<>
const char * get_units< std::deca > ()
 
template<>
const char * get_units< std::hecto > ()
 
template<>
const char * get_units< std::kilo > ()
 
template<>
const char * get_units< std::mega > ()
 
template<>
const char * get_units< std::giga > ()
 
template<>
const char * get_units< std::tera > ()
 
template<>
const char * get_units< std::peta > ()
 
template<>
const char * get_units< std::exa > ()
 
template<>
const char * get_units< std::ratio< 60 > > ()
 
template<>
const char * get_units< std::ratio< 3600 > > ()
 
text_style fg (internal::color_type foreground) throw ()
 
text_style bg (internal::color_type background) throw ()
 
text_style operator| (emphasis lhs, emphasis rhs) throw ()
 
template<typename S , typename Char = typename internal::char_t<S>::type>
void vprint (std::FILE *f, const text_style &ts, const S &format, basic_format_args< typename buffer_context< Char >::type > args)
 
template<typename String , typename... Args>
std::enable_if< internal::is_string< String >::value >::type print (std::FILE *f, const text_style &ts, const String &format_str, const Args &...args)
 
template<typename String , typename... Args>
std::enable_if< internal::is_string< String >::value >::type print (const text_style &ts, const String &format_str, const Args &...args)
 
template<typename Char >
basic_string_view< Char > to_string_view (basic_string_view< Char > s)
 
template<typename Char >
basic_string_view< Char > to_string_view (const std::basic_string< Char > &s)
 
template<typename Char >
basic_string_view< Char > to_string_view (const Char *s)
 
template<typename S , typename Enable = typename std::enable_if<is_compile_string<S>::value>::type>
basic_string_view< typename S::char_type > to_string_view (const S &s)
 
template<typename Visitor , typename Context >
internal::result_of< Visitor(int)>::type visit_format_arg (Visitor &&vis, const basic_format_arg< Context > &arg)
 
template<typename Visitor , typename Context >
internal::result_of< Visitor(int)>::type visit (Visitor &&vis, const basic_format_arg< Context > &arg)
 
template<typename Context = format_context, typename... Args>
format_arg_store< Context, Args... > make_format_args (const Args &...args)
 
template<typename T >
internal::named_arg< T, char > arg (string_view name, const T &arg)
 
template<typename T >
internal::named_arg< T, wchar_t > arg (wstring_view name, const T &arg)
 
template<typename S , typename T , typename Char >
void arg (S, internal::named_arg< T, Char >)=delete
 
template<typename Container , typename S >
std::enable_if< is_contiguous< Container >::value, std::back_insert_iterator< Container > >::type vformat_to (std::back_insert_iterator< Container > out, const S &format_str, basic_format_args< typename buffer_context< typename char_t< S >::type >::type > args)
 
template<typename Container , typename S , typename... Args>
std::enable_if< is_contiguous< Container >::value &&internal::is_string< S >::value, std::back_insert_iterator< Container > >::type format_to (std::back_insert_iterator< Container > out, const S &format_str, const Args &...args)
 
template<typename S , typename Char = typename char_t< S >::type>
std::basic_string< Char > vformat (const S &format_str, basic_format_args< typename buffer_context< Char >::type > args)
 
template<typename S , typename... Args>
std::basic_string< typename char_t< S >::type > format (const S &format_str, const Args &...args)
 
void vprint (std::FILE *f, string_view format_str, format_args args)
 
void vprint (std::FILE *f, wstring_view format_str, wformat_args args)
 
template<typename S , typename... Args>
std::enable_if< internal::is_string< S >::value, void >::type print (std::FILE *f, const S &format_str, const Args &...args)
 
void vprint (string_view format_str, format_args args)
 
void vprint (wstring_view format_str, wformat_args args)
 
template<typename S , typename... Args>
std::enable_if< internal::is_string< S >::value, void >::type print (const S &format_str, const Args &...args)
 
void format_system_error (internal::buffer &out, int error_code, string_view message) throw ()
 
void report_system_error (int error_code, fmt::string_view message) throw ()
 
template<typename T >
void format_decimal (char *&buffer, T value)
 
template<typename ArgFormatter , typename Char , typename Context >
Context::iterator vformat_to (typename ArgFormatter::range out, basic_string_view< Char > format_str, basic_format_args< Context > args, internal::locale_ref loc=internal::locale_ref())
 
template<typename T >
const void * ptr (const T *p)
 
template<typename It >
arg_join< It, char > join (It begin, It end, string_view sep)
 
template<typename It >
arg_join< It, wchar_t > join (It begin, It end, wstring_view sep)
 
template<typename T >
std::string to_string (const T &value)
 
template<typename T >
std::wstring to_wstring (const T &value)
 
template<typename Char , std::size_t SIZE>
std::basic_string< Char > to_string (const basic_memory_buffer< Char, SIZE > &buf)
 
template<typename S , typename Char = typename char_t< S >::type>
buffer_context< Char >::type::iterator vformat_to (internal::basic_buffer< Char > &buf, const S &format_str, basic_format_args< typename buffer_context< Char >::type > args)
 
template<typename S , typename... Args, std::size_t SIZE = inline_buffer_size, typename Char = typename internal::char_t<S>::type>
buffer_context< Char >::type::iterator format_to (basic_memory_buffer< Char, SIZE > &buf, const S &format_str, const Args &...args)
 
template<typename String , typename OutputIt , typename... Args>
std::enable_if< internal::is_output_iterator< OutputIt >::value, OutputIt >::type vformat_to (OutputIt out, const String &format_str, typename format_args_t< OutputIt, typename char_t< String >::type >::type args)
 
template<typename OutputIt , typename S , typename... Args>
std::enable_if< internal::is_string< S >::value &&internal::is_output_iterator< OutputIt >::value, OutputIt >::type format_to (OutputIt out, const S &format_str, const Args &...args)
 
template<typename OutputIt , typename Char , typename... Args>
format_arg_store< typename format_to_n_context< OutputIt, Char >::type, Args... > make_format_to_n_args (const Args &...args)
 
template<typename OutputIt , typename Char , typename... Args>
std::enable_if< internal::is_output_iterator< OutputIt >::value, format_to_n_result< OutputIt > >::type vformat_to_n (OutputIt out, std::size_t n, basic_string_view< Char > format_str, typename format_to_n_args< OutputIt, Char >::type args)
 
template<typename OutputIt , typename S , typename... Args>
std::enable_if< internal::is_string< S >::value &&internal::is_output_iterator< OutputIt >::value, format_to_n_result< OutputIt > >::type format_to_n (OutputIt out, std::size_t n, const S &format_str, const Args &...args)
 
template<typename... Args>
std::size_t formatted_size (string_view format_str, const Args &...args)
 
template<typename S , typename Char = typename char_t< S >::type>
std::basic_string< Char > vformat (const std::locale &loc, const S &format_str, basic_format_args< typename buffer_context< Char >::type > args)
 
template<typename S , typename... Args>
std::basic_string< typename char_t< S >::type > format (const std::locale &loc, const S &format_str, const Args &...args)
 
template<typename String , typename OutputIt , typename... Args>
std::enable_if< internal::is_output_iterator< OutputIt >::value, OutputIt >::type vformat_to (OutputIt out, const std::locale &loc, const String &format_str, typename format_args_t< OutputIt, typename char_t< String >::type >::type args)
 
template<typename OutputIt , typename S , typename... Args>
std::enable_if< internal::is_string< S >::value &&internal::is_output_iterator< OutputIt >::value, OutputIt >::type format_to (OutputIt out, const std::locale &loc, const S &format_str, const Args &...args)
 
template<typename Char >
void vprint (std::basic_ostream< Char > &os, basic_string_view< Char > format_str, basic_format_args< typename buffer_context< Char >::type > args)
 
template<typename S , typename... Args>
std::enable_if< internal::is_string< S >::value >::type print (std::basic_ostream< typename char_t< S >::type > &os, const S &format_str, const Args &...args)
 
long getpagesize ()
 
template<typename... Args>
format_arg_store< printf_context, Args... > make_printf_args (const Args &...args)
 
template<typename... Args>
format_arg_store< wprintf_context, Args... > make_wprintf_args (const Args &...args)
 
template<typename S , typename Char = typename char_t< S >::type>
std::basic_string< Char > vsprintf (const S &format, basic_format_args< typename basic_printf_context_t< internal::basic_buffer< Char >>::type > args)
 
template<typename S , typename... Args>
std::enable_if< internal::is_string< S >::value, std::basic_string< typename char_t< S >::type > >::type sprintf (const S &format, const Args &...args)
 
template<typename S , typename Char = typename char_t< S >::type>
int vfprintf (std::FILE *f, const S &format, basic_format_args< typename basic_printf_context_t< internal::basic_buffer< Char >>::type > args)
 
template<typename S , typename... Args>
std::enable_if< internal::is_string< S >::value, int >::type fprintf (std::FILE *f, const S &format, const Args &...args)
 
template<typename S , typename Char = typename char_t< S >::type>
int vprintf (const S &format, basic_format_args< typename basic_printf_context_t< internal::basic_buffer< Char >>::type > args)
 
template<typename S , typename... Args>
std::enable_if< internal::is_string< S >::value, int >::type printf (const S &format_str, const Args &...args)
 
template<typename S , typename Char = typename char_t< S >::type>
int vfprintf (std::basic_ostream< Char > &os, const S &format, basic_format_args< typename basic_printf_context_t< internal::basic_buffer< Char >>::type > args)
 
template<typename S , typename... Args>
std::enable_if< internal::is_string< S >::value, int >::type fprintf (std::basic_ostream< typename char_t< S >::type > &os, const S &format_str, const Args &...args)
 
std::tm localtime (std::time_t time)
 
std::tm gmtime (std::time_t time)
 

Typedef Documentation

Definition at line 112 of file posix.h.

Definition at line 1129 of file core.h.

Definition at line 925 of file core.h.

Definition at line 1115 of file format.h.

Definition at line 553 of file format.h.

Definition at line 929 of file core.h.

Definition at line 710 of file printf.h.

Definition at line 707 of file printf.h.

Definition at line 428 of file core.h.

Definition at line 113 of file posix.h.

typedef buffer_context<wchar_t>::type fmt::v5::wformat_context

Definition at line 1130 of file core.h.

Definition at line 926 of file core.h.

Definition at line 554 of file format.h.

Definition at line 930 of file core.h.

Definition at line 711 of file printf.h.

Definition at line 429 of file core.h.

Enumeration Type Documentation

anonymous enum
Enumerator
inline_buffer_size 

Definition at line 431 of file format.h.

anonymous enum
Enumerator
SIGN_FLAG 
PLUS_FLAG 
MINUS_FLAG 
HASH_FLAG 

Definition at line 1084 of file format.h.

Enumerator
ALIGN_DEFAULT 
ALIGN_LEFT 
ALIGN_RIGHT 
ALIGN_CENTER 
ALIGN_NUMERIC 

Definition at line 1079 of file format.h.

enum fmt::v5::char8_t : unsigned char

Definition at line 407 of file format.h.

enum fmt::v5::color : uint32_t
strong
Enumerator
alice_blue 
antique_white 
aqua 
aquamarine 
azure 
beige 
bisque 
black 
blanched_almond 
blue 
blue_violet 
brown 
burly_wood 
cadet_blue 
chartreuse 
chocolate 
coral 
cornflower_blue 
cornsilk 
crimson 
cyan 
dark_blue 
dark_cyan 
dark_golden_rod 
dark_gray 
dark_green 
dark_khaki 
dark_magenta 
dark_olive_green 
dark_orange 
dark_orchid 
dark_red 
dark_salmon 
dark_sea_green 
dark_slate_blue 
dark_slate_gray 
dark_turquoise 
dark_violet 
deep_pink 
deep_sky_blue 
dim_gray 
dodger_blue 
fire_brick 
floral_white 
forest_green 
fuchsia 
gainsboro 
ghost_white 
gold 
golden_rod 
gray 
green 
green_yellow 
honey_dew 
hot_pink 
indian_red 
indigo 
ivory 
khaki 
lavender 
lavender_blush 
lawn_green 
lemon_chiffon 
light_blue 
light_coral 
light_cyan 
light_golden_rod_yellow 
light_gray 
light_green 
light_pink 
light_salmon 
light_sea_green 
light_sky_blue 
light_slate_gray 
light_steel_blue 
light_yellow 
lime 
lime_green 
linen 
magenta 
maroon 
medium_aquamarine 
medium_blue 
medium_orchid 
medium_purple 
medium_sea_green 
medium_slate_blue 
medium_spring_green 
medium_turquoise 
medium_violet_red 
midnight_blue 
mint_cream 
misty_rose 
moccasin 
navajo_white 
navy 
old_lace 
olive 
olive_drab 
orange 
orange_red 
orchid 
pale_golden_rod 
pale_green 
pale_turquoise 
pale_violet_red 
papaya_whip 
peach_puff 
peru 
pink 
plum 
powder_blue 
purple 
rebecca_purple 
red 
rosy_brown 
royal_blue 
saddle_brown 
salmon 
sandy_brown 
sea_green 
sea_shell 
sienna 
silver 
sky_blue 
slate_blue 
slate_gray 
snow 
spring_green 
steel_blue 
tan 
teal 
thistle 
tomato 
turquoise 
violet 
wheat 
white 
white_smoke 
yellow 
yellow_green 

Definition at line 50 of file color.h.

enum fmt::v5::emphasis : uint8_t
strong
Enumerator
bold 
italic 
underline 
strikethrough 

Definition at line 213 of file color.h.

enum fmt::v5::terminal_color : uint8_t
strong
Enumerator
black 
red 
green 
yellow 
blue 
magenta 
cyan 
white 
bright_black 
bright_red 
bright_green 
bright_yellow 
bright_blue 
bright_magenta 
bright_cyan 
bright_white 

Definition at line 194 of file color.h.

Function Documentation

template<typename T >
internal::named_arg<T, char> fmt::v5::arg ( string_view  name,
const T &  arg 
)
inline

Returns a named argument to be used in a formatting function.

Example**::

fmt::print("Elapsed time: {s:.2f} seconds", fmt::arg("s", 1.23));

Definition at line 1391 of file core.h.

template<typename T >
internal::named_arg<T, wchar_t> fmt::v5::arg ( wstring_view  name,
const T &  arg 
)
inline

Definition at line 1396 of file core.h.

template<typename S , typename T , typename Char >
void fmt::v5::arg ( ,
internal::named_arg< T, Char >   
)
delete
text_style fmt::v5::bg ( internal::color_type  background)
throw (
)
inline

Definition at line 381 of file color.h.

text_style fmt::v5::fg ( internal::color_type  foreground)
throw (
)
inline

Definition at line 377 of file color.h.

template<typename S , typename... Args>
std::basic_string<typename char_t< S >::type> fmt::v5::format ( const std::locale &  loc,
const S &  format_str,
const Args &...  args 
)
inline

Definition at line 45 of file locale.h.

template<typename S , typename... Args>
std::basic_string<typename char_t< S >::type> fmt::v5::format ( const S &  format_str,
const Args &...  args 
)
inline

Formats arguments and returns the result as a string.

Example**::

#include <fmt/core.h> std::string message = fmt::format("The answer is {}", 42);

Definition at line 1454 of file core.h.

template<typename T >
void fmt::v5::format_decimal ( char *&  buffer,
value 
)
inline

Definition at line 2894 of file format.h.

void fmt::v5::format_system_error ( internal::buffer out,
int  error_code,
fmt::string_view  message 
)
throw (
)

Formats an error returned by an operating system or a language runtime, for example a file opening error, and writes it to out in the following form:

.. parsed-literal:: <message>*: *<system-message>*

where *<message>* is the passed message and *<system-message>* is the system message corresponding to the error code. error_code* is a system error code as given by errno. If error_code is not a valid error code such as -1, the system message may look like "Unknown error -1" and is platform-dependent.

Definition at line 906 of file format-inl.h.

template<typename OutputIt , typename S , typename... Args>
std::enable_if< internal::is_string<S>::value && internal::is_output_iterator<OutputIt>::value, OutputIt>::type fmt::v5::format_to ( OutputIt  out,
const std::locale &  loc,
const S &  format_str,
const Args &...  args 
)
inline

Definition at line 66 of file locale.h.

template<typename Container , typename S , typename... Args>
std::enable_if< is_contiguous<Container>::value && internal::is_string<S>::value, std::back_insert_iterator<Container> >::type fmt::v5::format_to ( std::back_insert_iterator< Container >  out,
const S &  format_str,
const Args &...  args 
)
inline

Definition at line 1430 of file core.h.

template<typename S , typename... Args, std::size_t SIZE = inline_buffer_size, typename Char = typename internal::char_t<S>::type>
buffer_context<Char>::type::iterator fmt::v5::format_to ( basic_memory_buffer< Char, SIZE > &  buf,
const S &  format_str,
const Args &...  args 
)
inline

Definition at line 3252 of file format.h.

template<typename OutputIt , typename S , typename... Args>
std::enable_if< internal::is_string<S>::value && internal::is_output_iterator<OutputIt>::value , OutputIt >::type fmt::v5::format_to ( OutputIt  out,
const S &  format_str,
const Args &...  args 
)
inline

Formats arguments, writes the result to the output iterator out and returns the iterator past the end of the output range.

Example**::

std::vector<char> out; fmt::format_to(std::back_inserter(out), "{}", 42);

Definition at line 3342 of file format.h.

template<typename OutputIt , typename S , typename... Args>
std::enable_if< internal::is_string<S>::value && internal::is_output_iterator<OutputIt>::value , format_to_n_result<OutputIt> >::type fmt::v5::format_to_n ( OutputIt  out,
std::size_t  n,
const S &  format_str,
const Args &...  args 
)
inline

Formats arguments, writes up to n characters of the result to the output iterator out and returns the total output size and the iterator past the end of the output range.

Definition at line 3399 of file format.h.

template<typename... Args>
std::size_t fmt::v5::formatted_size ( string_view  format_str,
const Args &...  args 
)
inline

Returns the number of characters in the output of format(format_str, args...).

Definition at line 3423 of file format.h.

template<typename S , typename... Args>
std::enable_if< internal::is_string<S>::value , int >::type fmt::v5::fprintf ( std::FILE *  f,
const S &  format,
const Args &...  args 
)
inline

Prints formatted data to the file f.

Example**::

fmt::fprintf(stderr, "Don't %s!", "panic");

Definition at line 786 of file printf.h.

template<typename S , typename... Args>
std::enable_if< internal::is_string<S>::value , int >::type fmt::v5::fprintf ( std::basic_ostream< typename char_t< S >::type > &  os,
const S &  format_str,
const Args &...  args 
)
inline

Prints formatted data to the stream os.

Example**::

fmt::fprintf(cerr, "Don't %s!", "panic");

Definition at line 844 of file printf.h.

template<typename Period >
const char* fmt::v5::get_units ( )
inline

Definition at line 344 of file chrono.h.

template<>
const char* fmt::v5::get_units< std::atto > ( )
inline

Definition at line 347 of file chrono.h.

template<>
const char* fmt::v5::get_units< std::centi > ( )
inline

Definition at line 353 of file chrono.h.

template<>
const char* fmt::v5::get_units< std::deca > ( )
inline

Definition at line 356 of file chrono.h.

template<>
const char* fmt::v5::get_units< std::deci > ( )
inline

Definition at line 354 of file chrono.h.

template<>
const char* fmt::v5::get_units< std::exa > ( )
inline

Definition at line 363 of file chrono.h.

template<>
const char* fmt::v5::get_units< std::femto > ( )
inline

Definition at line 348 of file chrono.h.

template<>
const char* fmt::v5::get_units< std::giga > ( )
inline

Definition at line 360 of file chrono.h.

template<>
const char* fmt::v5::get_units< std::hecto > ( )
inline

Definition at line 357 of file chrono.h.

template<>
const char* fmt::v5::get_units< std::kilo > ( )
inline

Definition at line 358 of file chrono.h.

template<>
const char* fmt::v5::get_units< std::mega > ( )
inline

Definition at line 359 of file chrono.h.

template<>
const char* fmt::v5::get_units< std::micro > ( )
inline

Definition at line 351 of file chrono.h.

template<>
const char* fmt::v5::get_units< std::milli > ( )
inline

Definition at line 352 of file chrono.h.

template<>
const char* fmt::v5::get_units< std::nano > ( )
inline

Definition at line 350 of file chrono.h.

template<>
const char* fmt::v5::get_units< std::peta > ( )
inline

Definition at line 362 of file chrono.h.

template<>
const char* fmt::v5::get_units< std::pico > ( )
inline

Definition at line 349 of file chrono.h.

template<>
const char* fmt::v5::get_units< std::ratio< 1 > > ( )
inline

Definition at line 355 of file chrono.h.

template<>
const char* fmt::v5::get_units< std::ratio< 3600 > > ( )
inline

Definition at line 367 of file chrono.h.

template<>
const char* fmt::v5::get_units< std::ratio< 60 > > ( )
inline

Definition at line 364 of file chrono.h.

template<>
const char* fmt::v5::get_units< std::tera > ( )
inline

Definition at line 361 of file chrono.h.

long fmt::v5::getpagesize ( )
std::tm fmt::v5::gmtime ( std::time_t  time)
inline

Definition at line 67 of file time.h.

template<typename It >
arg_join<It, char> fmt::v5::join ( It  begin,
It  end,
string_view  sep 
)

Definition at line 3172 of file format.h.

template<typename It >
arg_join<It, wchar_t> fmt::v5::join ( It  begin,
It  end,
wstring_view  sep 
)

Definition at line 3177 of file format.h.

std::tm fmt::v5::localtime ( std::time_t  time)
inline

Definition at line 29 of file time.h.

template<typename Context = format_context, typename... Args>
format_arg_store<Context, Args...> fmt::v5::make_format_args ( const Args &...  args)
inline

Constructs an ~fmt::format_arg_store object that contains references to arguments and can be implicitly converted to ~fmt::format_args. Context can be omitted in which case it defaults to ~fmt::context.

Definition at line 1199 of file core.h.

template<typename OutputIt , typename Char , typename... Args>
format_arg_store< typename format_to_n_context<OutputIt, Char>::type, Args...> fmt::v5::make_format_to_n_args ( const Args &...  args)
inline

Definition at line 3371 of file format.h.

template<typename... Args>
format_arg_store<printf_context, Args...> fmt::v5::make_printf_args ( const Args &...  args)
inline

Constructs an ~fmt::format_arg_store object that contains references to arguments and can be implicitly converted to ~fmtprintf_args.

Definition at line 721 of file printf.h.

template<typename... Args>
format_arg_store<wprintf_context, Args...> fmt::v5::make_wprintf_args ( const Args &...  args)
inline

Constructs an ~fmt::format_arg_store object that contains references to arguments and can be implicitly converted to ~fmtwprintf_args.

Definition at line 731 of file printf.h.

text_style fmt::v5::operator| ( emphasis  lhs,
emphasis  rhs 
)
throw (
)
inline

Definition at line 385 of file color.h.

template<typename S , typename... Args>
std::enable_if<internal::is_string<S>::value>::type fmt::v5::print ( std::basic_ostream< typename char_t< S >::type > &  os,
const S &  format_str,
const Args &...  args 
)
inline

Prints formatted data to the stream os.

Example**::

fmt::print(cerr, "Don't {}!", "panic");

Definition at line 146 of file ostream.h.

template<typename String , typename... Args>
std::enable_if<internal::is_string<String>::value>::type fmt::v5::print ( std::FILE *  f,
const text_style ts,
const String &  format_str,
const Args &...  args 
)

Formats a string and prints it to the specified file stream using ANSI escape sequences to specify text formatting. Example: fmt::print(fmt::emphasis::bold | fg(fmt::color::red), "Elapsed time: {0:.2f} seconds", 1.23);

Definition at line 549 of file color.h.

template<typename String , typename... Args>
std::enable_if<internal::is_string<String>::value>::type fmt::v5::print ( const text_style ts,
const String &  format_str,
const Args &...  args 
)

Formats a string and prints it to stdout using ANSI escape sequences to specify text formatting. Example: fmt::print(fmt::emphasis::bold | fg(fmt::color::red), "Elapsed time: {0:.2f} seconds", 1.23);

Definition at line 567 of file color.h.

template<typename S , typename... Args>
std::enable_if< internal::is_string<S>::value , void >::type fmt::v5::print ( std::FILE *  f,
const S &  format_str,
const Args &...  args 
)
inline

Prints formatted data to the file f. For wide format strings, f* should be in wide-oriented mode set via fwide(f, 1) or _setmode(_fileno(f), _O_U8TEXT) on Windows.

Example**::

fmt::print(stderr, "Don't {}!", "panic");

Definition at line 1477 of file core.h.

template<typename S , typename... Args>
std::enable_if< internal::is_string<S>::value , void >::type fmt::v5::print ( const S &  format_str,
const Args &...  args 
)
inline

Prints formatted data to stdout.

Example**::

fmt::print("Elapsed time: {0:.2f} seconds", 1.23);

Definition at line 1496 of file core.h.

template<typename S , typename... Args>
std::enable_if< internal::is_string<S>::value , int >::type fmt::v5::printf ( const S &  format_str,
const Args &...  args 
)
inline

Prints formatted data to stdout.

Example**::

fmt::printf("Elapsed time: %.2f seconds", 1.23);

Definition at line 813 of file printf.h.

template<typename T >
const void* fmt::v5::ptr ( const T *  p)
inline

Definition at line 3138 of file format.h.

void fmt::v5::report_system_error ( int  error_code,
fmt::string_view  message 
)
throw (
)

Definition at line 933 of file format-inl.h.

template<typename S , typename... Args>
std::enable_if< internal::is_string<S>::value , std::basic_string<typename char_t< S >::type> >::type fmt::v5::sprintf ( const S &  format,
const Args &...  args 
)
inline

Formats arguments and returns the result as a string.

Example**::

std::string message = fmt::sprintf("The answer is %d", 42);

Definition at line 755 of file printf.h.

template<typename T >
std::string fmt::v5::to_string ( const T &  value)

Converts value to std::string using the default format for type T. It doesn't support user-defined types with custom formatters.

Example**::

#include <fmt/format.h>

std::string answer = fmt::to_string(42);

Definition at line 3209 of file format.h.

template<typename Char , std::size_t SIZE>
std::basic_string<Char> fmt::v5::to_string ( const basic_memory_buffer< Char, SIZE > &  buf)

Definition at line 3228 of file format.h.

template<typename Char >
basic_string_view<Char> fmt::v5::to_string_view ( basic_string_view< Char >  s)
inline

The function to_string_view adapts non-intrusively any kind of string or string-like type if the user provides a (possibly templated) overload of to_string_view which takes an instance of the string class StringType<Char> and returns a fmt::basic_string_view<Char>. The conversion function must live in the very same namespace as StringType<Char> to be picked up by ADL. Non-templated string types like f.e. QString must return a basic_string_view with a fixed matching char type.

Example**::

namespace my_ns { inline string_view to_string_view(const my_string &s) { return {s.data(), s.length()}; } }

std::string message = fmt::format(my_string("The answer is {}"), 42);

Definition at line 455 of file core.h.

template<typename Char >
basic_string_view<Char> fmt::v5::to_string_view ( const std::basic_string< Char > &  s)
inline

Definition at line 459 of file core.h.

template<typename Char >
basic_string_view<Char> fmt::v5::to_string_view ( const Char *  s)
inline

Definition at line 462 of file core.h.

template<typename S , typename Enable = typename std::enable_if<is_compile_string<S>::value>::type>
basic_string_view<typename S::char_type> fmt::v5::to_string_view ( const S &  s)
inline

Definition at line 481 of file core.h.

template<typename T >
std::wstring fmt::v5::to_wstring ( const T &  value)

Converts value to std::wstring using the default format for type T.

Definition at line 3220 of file format.h.

template<typename S , typename Char = typename char_t< S >::type>
std::basic_string<Char> fmt::v5::vformat ( const std::locale &  loc,
const S &  format_str,
basic_format_args< typename buffer_context< Char >::type >  args 
)
inline

Definition at line 38 of file locale.h.

template<typename S , typename Char = typename char_t< S >::type>
std::basic_string<Char> fmt::v5::vformat ( const S &  format_str,
basic_format_args< typename buffer_context< Char >::type >  args 
)
inline

Definition at line 1437 of file core.h.

template<typename String , typename OutputIt , typename... Args>
std::enable_if<internal::is_output_iterator<OutputIt>::value, OutputIt>::type fmt::v5::vformat_to ( OutputIt  out,
const std::locale &  loc,
const String &  format_str,
typename format_args_t< OutputIt, typename char_t< String >::type >::type  args 
)
inline

Definition at line 55 of file locale.h.

template<typename Container , typename S >
std::enable_if< is_contiguous<Container>::value, std::back_insert_iterator<Container> >::type fmt::v5::vformat_to ( std::back_insert_iterator< Container >  out,
const S &  format_str,
basic_format_args< typename buffer_context< typename char_t< S >::type >::type >  args 
)

Formats a string and writes the output to out.

Definition at line 1417 of file core.h.

template<typename ArgFormatter , typename Char , typename Context >
Context::iterator fmt::v5::vformat_to ( typename ArgFormatter::range  out,
basic_string_view< Char >  format_str,
basic_format_args< Context >  args,
internal::locale_ref  loc = internal::locale_ref() 
)

Formats arguments and writes the output to the range.

Definition at line 3124 of file format.h.

template<typename S , typename Char = typename char_t< S >::type>
buffer_context<Char>::type::iterator fmt::v5::vformat_to ( internal::basic_buffer< Char > &  buf,
const S &  format_str,
basic_format_args< typename buffer_context< Char >::type >  args 
)
inline

Definition at line 3242 of file format.h.

template<typename String , typename OutputIt , typename... Args>
std::enable_if<internal::is_output_iterator<OutputIt>::value, OutputIt>::type fmt::v5::vformat_to ( OutputIt  out,
const String &  format_str,
typename format_args_t< OutputIt, typename char_t< String >::type >::type  args 
)
inline

Definition at line 3320 of file format.h.

template<typename OutputIt , typename Char , typename... Args>
std::enable_if< internal::is_output_iterator<OutputIt>::value, format_to_n_result<OutputIt> >::type fmt::v5::vformat_to_n ( OutputIt  out,
std::size_t  n,
basic_string_view< Char >  format_str,
typename format_to_n_args< OutputIt, Char >::type  args 
)
inline

Definition at line 3379 of file format.h.

template<typename S , typename Char = typename char_t< S >::type>
int fmt::v5::vfprintf ( std::FILE *  f,
const S &  format,
basic_format_args< typename basic_printf_context_t< internal::basic_buffer< Char >>::type >  args 
)
inline

Definition at line 765 of file printf.h.

template<typename S , typename Char = typename char_t< S >::type>
int fmt::v5::vfprintf ( std::basic_ostream< Char > &  os,
const S &  format,
basic_format_args< typename basic_printf_context_t< internal::basic_buffer< Char >>::type >  args 
)
inline

Definition at line 823 of file printf.h.

template<typename Visitor , typename Context >
internal::result_of<Visitor(int)>::type fmt::v5::visit ( Visitor &&  vis,
const basic_format_arg< Context > &  arg 
)
inline

Definition at line 871 of file core.h.

template<typename Visitor , typename Context >
internal::result_of<Visitor(int)>::type fmt::v5::visit_format_arg ( Visitor &&  vis,
const basic_format_arg< Context > &  arg 
)
inline

Visits an argument dispatching to the appropriate visit method based on the argument type. For example, if the argument type is double then vis(value) will be called with the value of type double.

Definition at line 831 of file core.h.

template<typename Char >
void fmt::v5::vprint ( std::basic_ostream< Char > &  os,
basic_string_view< Char >  format_str,
basic_format_args< typename buffer_context< Char >::type >  args 
)
inline

Definition at line 128 of file ostream.h.

template<typename S , typename Char = typename internal::char_t<S>::type>
void fmt::v5::vprint ( std::FILE *  f,
const text_style ts,
const S &  format,
basic_format_args< typename buffer_context< Char >::type >  args 
)

Definition at line 517 of file color.h.

void fmt::v5::vprint ( std::FILE *  f,
string_view  format_str,
format_args  args 
)

Definition at line 945 of file format-inl.h.

void fmt::v5::vprint ( std::FILE *  f,
wstring_view  format_str,
wformat_args  args 
)

Definition at line 952 of file format-inl.h.

void fmt::v5::vprint ( string_view  format_str,
format_args  args 
)

Definition at line 958 of file format-inl.h.

void fmt::v5::vprint ( wstring_view  format_str,
wformat_args  args 
)

Definition at line 962 of file format-inl.h.

template<typename S , typename Char = typename char_t< S >::type>
int fmt::v5::vprintf ( const S &  format,
basic_format_args< typename basic_printf_context_t< internal::basic_buffer< Char >>::type >  args 
)
inline

Definition at line 796 of file printf.h.

template<typename S , typename Char = typename char_t< S >::type>
std::basic_string<Char> fmt::v5::vsprintf ( const S &  format,
basic_format_args< typename basic_printf_context_t< internal::basic_buffer< Char >>::type >  args 
)
inline

Definition at line 735 of file printf.h.