Namespaces

Enumerations

enum range_format
Name Value
disabled 0
map 1
set 2
sequence 3
string 4
debug_string 5

Defined at line 24 of file ../../third_party/fmtlib/src/include/fmt/ranges.h

enum presentation_type
Name Value
none 0
debug 1
string 2
dec 3
hex 4
oct 5
bin 6
chr 7
pointer 3
exp 1
fixed 2
general 3
hexfloat 4

Defined at line 674 of file ../../third_party/fmtlib/src/include/fmt/base.h

enum align
Name Value
none 0
left 1
right 2
center 3
numeric 4

Defined at line 697 of file ../../third_party/fmtlib/src/include/fmt/base.h

enum sign
Name Value
none 0
minus 1
plus 2
space 3

Defined at line 698 of file ../../third_party/fmtlib/src/include/fmt/base.h

enum arg_id_kind
Name Value
none 0
index 1
name 2

Defined at line 699 of file ../../third_party/fmtlib/src/include/fmt/base.h

Records

Functions

  • void format_system_error (detail::buffer<char> & out, int error_code, const char * message)

    Formats an error message for an error returned by an operating system or a

    language runtime, for example a file opening error, and writes it to `out`.

    The format is the same as the one used by `std::system_error(ec, message)`

    where `ec` is `std::error_code(error_code, std::generic_category())`.

    It is implementation-defined but normally looks like:

    <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`.

  • template <typename T>
    detail::streamed_view<T> streamed (const T & value)

    Returns a view that formats `value` via an ostream `operator

    <

    <

    `.

    **Example**:

    fmt::print("Current thread id: {}\n",

    fmt::streamed(std::this_thread::get_id()));

    Defined at line 112 of file ../../third_party/fmtlib/src/include/fmt/ostream.h

  • void vprint (std::ostream & os, string_view fmt, format_args args)

    Defined at line 116 of file ../../third_party/fmtlib/src/include/fmt/ostream.h

  • template <typename... T>
    void print (std::ostream & os, format_string<T...> fmt, T &&... args)

    Prints formatted data to the stream `os`.

    **Example**:

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

    Defined at line 151 of file ../../third_party/fmtlib/src/include/fmt/ostream.h

  • template <typename... T>
    void println (std::ostream & os, format_string<T...> fmt, T &&... args)

    Defined at line 160 of file ../../third_party/fmtlib/src/include/fmt/ostream.h

  • template <typename T, typename Deleter>
    const void * ptr (const std::unique_ptr<T, Deleter> & p)

    Defined at line 251 of file ../../third_party/fmtlib/src/include/fmt/std.h

  • template <typename T>
    const void * ptr (const std::shared_ptr<T> & p)

    Defined at line 254 of file ../../third_party/fmtlib/src/include/fmt/std.h

  • template <typename T>
    T min_of (T a, T b)

    Defined at line 352 of file ../../third_party/fmtlib/src/include/fmt/base.h

  • template <typename T>
    T max_of (T a, T b)

    Defined at line 355 of file ../../third_party/fmtlib/src/include/fmt/base.h

  • std::tm localtime (std::time_t time)

    Converts given time since epoch as `std::time_t` value into calendar time,

    expressed in local time. Unlike `std::localtime`, this function is

    thread-safe on most platforms.

    Defined at line 538 of file ../../third_party/fmtlib/src/include/fmt/chrono.h

  • template <typename Char = char, typename... T>
    decltype(fmt::make_format_args<basic_printf_context<Char>>(args...)) make_printf_args (T &... args)

    Constructs an `format_arg_store` object that contains references to

    arguments and can be implicitly converted to `printf_args`.

    Defined at line 548 of file ../../third_party/fmtlib/src/include/fmt/printf.h

  • template <typename Char>
    std::basic_string<Char> vsprintf (basic_string_view<Char> fmt, typename vprintf_args<Char>::type args)

    Defined at line 558 of file ../../third_party/fmtlib/src/include/fmt/printf.h

  • template <typename S, typename... T, typename Char = detail::char_t<S>>
    std::basic_string<Char> sprintf (const S & fmt, const T &... args)

    Formats `args` according to specifications in `fmt` and returns the result

    as as string.

    **Example**:

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

    Defined at line 575 of file ../../third_party/fmtlib/src/include/fmt/printf.h

  • template <typename Char>
    int vfprintf (std::FILE * f, basic_string_view<Char> fmt, typename vprintf_args<Char>::type args)

    Defined at line 581 of file ../../third_party/fmtlib/src/include/fmt/printf.h

  • std::tm gmtime (std::time_t time)

    Converts given time since epoch as `std::time_t` value into calendar time,

    expressed in Coordinated Universal Time (UTC). Unlike `std::gmtime`, this

    function is thread-safe on most platforms.

    Defined at line 589 of file ../../third_party/fmtlib/src/include/fmt/chrono.h

  • bool operator== (basic_string_view<Char> lhs, basic_string_view<Char> rhs)

    Defined at line 595 of file ../../third_party/fmtlib/src/include/fmt/base.h

  • bool operator!= (basic_string_view<Char> lhs, basic_string_view<Char> rhs)

    Defined at line 599 of file ../../third_party/fmtlib/src/include/fmt/base.h

  • template <typename S, typename... T, typename Char = detail::char_t<S>>
    int fprintf (std::FILE * f, const S & fmt, const T &... args)

    Formats `args` according to specifications in `fmt` and writes the output

    to `f`.

    **Example**:

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

    Defined at line 600 of file ../../third_party/fmtlib/src/include/fmt/printf.h

  • bool operator< (basic_string_view<Char> lhs, basic_string_view<Char> rhs)

    Defined at line 602 of file ../../third_party/fmtlib/src/include/fmt/base.h

  • bool operator<= (basic_string_view<Char> lhs, basic_string_view<Char> rhs)

    Defined at line 605 of file ../../third_party/fmtlib/src/include/fmt/base.h

  • template <typename Char>
    int vprintf (basic_string_view<Char> fmt, typename vprintf_args<Char>::type args)

    Defined at line 606 of file ../../third_party/fmtlib/src/include/fmt/printf.h

  • bool operator> (basic_string_view<Char> lhs, basic_string_view<Char> rhs)

    Defined at line 608 of file ../../third_party/fmtlib/src/include/fmt/base.h

  • bool operator>= (basic_string_view<Char> lhs, basic_string_view<Char> rhs)

    Defined at line 611 of file ../../third_party/fmtlib/src/include/fmt/base.h

  • template <typename... T>
    int printf (string_view fmt, const T &... args)

    Formats `args` according to specifications in `fmt` and writes the output

    to `stdout`.

    **Example**:

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

    Defined at line 621 of file ../../third_party/fmtlib/src/include/fmt/printf.h

  • template <typename Duration>
    std::tm gmtime (sys_time<Duration> time_point)

    Defined at line 625 of file ../../third_party/fmtlib/src/include/fmt/chrono.h

  • template <typename... T>
    int printf (basic_string_view<wchar_t> fmt, const T &... args)

    Defined at line 625 of file ../../third_party/fmtlib/src/include/fmt/printf.h

  • template <typename It, typename Sentinel>
    join_view<It, Sentinel> join (It begin, Sentinel end, string_view sep)

    Returns a view that formats the iterator range `[begin, end)` with elements

    separated by `sep`.

    Defined at line 789 of file ../../third_party/fmtlib/src/include/fmt/ranges.h

  • template <typename Range, FMT_ENABLE_IF(!is_tuple_like<Range>::value)>
    join_view<decltype(detail::range_begin(r)), decltype(detail::range_end(r))> join (Range && r, string_view sep)

    Returns a view that formats `range` with elements separated by `sep`.

    **Example**:

    auto v = std::vector

    <int

    >{1, 2, 3};

    fmt::print("{}", fmt::join(v, ", "));

    // Output: 1, 2, 3

    `fmt::join` applies passed format specifiers to the range elements:

    fmt::print("{:02}", fmt::join(v, ", "));

    // Output: 01, 02, 03

    Defined at line 808 of file ../../third_party/fmtlib/src/include/fmt/ranges.h

  • template <typename Tuple, FMT_ENABLE_IF(is_tuple_like<Tuple>::value)>
    tuple_join_view<Tuple, char> join (const Tuple & tuple, string_view sep)

    Returns an object that formats `std::tuple` with elements separated by `sep`.

    **Example**:

    auto t = std::tuple

    <int

    , char>{1, 'a'};

    fmt::print("{}", fmt::join(t, ", "));

    // Output: 1, a

    Defined at line 824 of file ../../third_party/fmtlib/src/include/fmt/ranges.h

  • template <typename T>
    join_view<const T *, const T *> join (std::initializer_list<T> list, string_view sep)

    Returns an object that formats `std::initializer_list` with elements

    separated by `sep`.

    **Example**:

    fmt::print("{}", fmt::join({1, 2, 3}, ", "));

    // Output: "1, 2, 3"

    Defined at line 839 of file ../../third_party/fmtlib/src/include/fmt/ranges.h

  • template <size_t SIZE>
    std::string to_string (const basic_memory_buffer<char, SIZE> & buf)

    Defined at line 894 of file ../../third_party/fmtlib/src/include/fmt/format.h

  • runtime_format_string<> runtime (string_view s)

    Creates a runtime format string.

    **Example**:

    // Check format string at runtime instead of compile-time.

    fmt::print(fmt::runtime("{:d}"), "I am not a number");

    Defined at line 2728 of file ../../third_party/fmtlib/src/include/fmt/base.h

  • template <typename Context = context, typename... T, int NUM_ARGS = sizeof...(T), int NUM_NAMED_ARGS = detail::count_named_args<T...>(), unsigned long long DESC = detail::make_descriptor<Context, T...>()>
    detail::format_arg_store<Context, NUM_ARGS, NUM_NAMED_ARGS, DESC> make_format_args (T &... args)

    Constructs an object that stores references to arguments and can be

    implicitly converted to `format_args`. `Context` can be omitted in which case

    it defaults to `context`. See `arg` for lifetime considerations.

    Take arguments by lvalue references to avoid some lifetime issues, e.g.

    auto args = make_format_args(std::string());

    Defined at line 2822 of file ../../third_party/fmtlib/src/include/fmt/base.h

  • template <typename Char, typename T>
    detail::named_arg<Char, T> arg (const Char * name, const T & arg)

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

    It should only be used in a call to a formatting function.

    **Example**:

    fmt::print("The answer is {answer}.", fmt::arg("answer", 42));

    Defined at line 2844 of file ../../third_party/fmtlib/src/include/fmt/base.h

  • template <typename OutputIt, FMT_ENABLE_IF(detail::is_output_iterator<remove_cvref_t<OutputIt>,
                                                                                   char>::value)>
    remove_cvref_t<OutputIt> vformat_to (OutputIt && out, string_view fmt, format_args args)

    Formats a string and writes the output to `out`.

    Defined at line 2852 of file ../../third_party/fmtlib/src/include/fmt/base.h

  • template <typename OutputIt, typename... T, FMT_ENABLE_IF(detail::is_output_iterator<remove_cvref_t<OutputIt>,
                                                                                   char>::value)>
    remove_cvref_t<OutputIt> format_to (OutputIt && out, format_string<T...> fmt, T &&... args)

    Formats `args` according to specifications in `fmt`, writes the result to

    the output iterator `out` and returns the iterator past the end of the output

    range. `format_to` does not append a terminating null character.

    **Example**:

    auto out = std::vector

    <char

    >();

    fmt::format_to(std::back_inserter(out), "{}", 42);

    Defined at line 2872 of file ../../third_party/fmtlib/src/include/fmt/base.h

  • template <typename OutputIt, typename... T, FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, char>::value)>
    format_to_n_result<OutputIt> vformat_to_n (OutputIt out, size_t n, string_view fmt, format_args args)

    Defined at line 2886 of file ../../third_party/fmtlib/src/include/fmt/base.h

  • template <typename OutputIt, typename... T, FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, char>::value)>
    format_to_n_result<OutputIt> format_to_n (OutputIt out, size_t n, format_string<T...> fmt, T &&... args)

    Formats `args` according to specifications in `fmt`, writes up to `n`

    characters of the result to the output iterator `out` and returns the total

    (not truncated) output size and the iterator past the end of the output

    range. `format_to_n` does not append a terminating null character.

    Defined at line 2902 of file ../../third_party/fmtlib/src/include/fmt/base.h

  • template <size_t N>
    format_to_result vformat_to (char (&)[N] out, string_view fmt, format_args args)

    Defined at line 2921 of file ../../third_party/fmtlib/src/include/fmt/base.h

  • template <size_t N, typename... T>
    format_to_result format_to (char (&)[N] out, format_string<T...> fmt, T &&... args)

    Defined at line 2928 of file ../../third_party/fmtlib/src/include/fmt/base.h

  • template <typename... T>
    size_t formatted_size (format_string<T...> fmt, T &&... args)

    Returns the number of chars in the output of `format(fmt, args...)`.

    Defined at line 2936 of file ../../third_party/fmtlib/src/include/fmt/base.h

  • template <typename... T>
    void print (format_string<T...> fmt, T &&... args)

    Formats `args` according to specifications in `fmt` and writes the output

    to `stdout`.

    **Example**:

    fmt::print("The answer is {}.", 42);

    Defined at line 2957 of file ../../third_party/fmtlib/src/include/fmt/base.h

  • template <typename... T>
    void print (FILE * f, format_string<T...> fmt, T &&... args)

    Formats `args` according to specifications in `fmt` and writes the

    output to the file `f`.

    **Example**:

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

    Defined at line 2974 of file ../../third_party/fmtlib/src/include/fmt/base.h

  • template <typename... T>
    void println (FILE * f, format_string<T...> fmt, T &&... args)

    Formats `args` according to specifications in `fmt` and writes the output

    to the file `f` followed by a newline.

    Defined at line 2985 of file ../../third_party/fmtlib/src/include/fmt/base.h

  • template <typename... T>
    void println (format_string<T...> fmt, T &&... args)

    Formats `args` according to specifications in `fmt` and writes the output

    to `stdout` followed by a newline.

    Defined at line 2995 of file ../../third_party/fmtlib/src/include/fmt/base.h

  • template <typename T>
    const void * ptr (T p)

    Converts `p` to `const void*` for pointer formatting.

    **Example**:

    auto s = fmt::format("{}", fmt::ptr(p));

    Defined at line 3881 of file ../../third_party/fmtlib/src/include/fmt/format.h

  • template <typename Enum>
    underlying_t<Enum> underlying (Enum e)

    Converts `e` to the underlying type.

    **Example**:

    enum class color { red, green, blue };

    auto s = fmt::format("{}", fmt::underlying(color::red)); // s == "0"

    Defined at line 3895 of file ../../third_party/fmtlib/src/include/fmt/format.h

  • template <typename T>
    group_digits_view<T> group_digits (T value)

    Returns a view that formats an integer value using ',' as a

    locale-independent thousands separator.

    **Example**:

    fmt::print("{}", fmt::group_digits(12345));

    // Output: "12,345"

    Defined at line 3960 of file ../../third_party/fmtlib/src/include/fmt/format.h

  • template <typename... T>
    std::system_error system_error (int error_code, format_string<T...> fmt, T &&... args)

    Constructs `std::system_error` with a message formatted with

    `fmt::format(fmt, args...)`.

    `error_code` is a system error code as given by `errno`.

    **Example**:

    // This throws std::system_error with the description

    // cannot open file 'madeup': No such file or directory

    // or similar (system message may vary).

    const char* filename = "madeup";

    FILE* file = fopen(filename, "r");

    if (!file)

    throw fmt::system_error(errno, "cannot open file '{}'", filename);

    Defined at line 4173 of file ../../third_party/fmtlib/src/include/fmt/format.h

  • template <typename Locale, FMT_ENABLE_IF(detail::is_locale<Locale>::value)>
    std::string vformat (const Locale & loc, string_view fmt, format_args args)

    Defined at line 4199 of file ../../third_party/fmtlib/src/include/fmt/format.h

  • template <typename Locale, typename... T, FMT_ENABLE_IF(detail::is_locale<Locale>::value)>
    std::string format (const Locale & loc, format_string<T...> fmt, T &&... args)

    Defined at line 4208 of file ../../third_party/fmtlib/src/include/fmt/format.h

  • template <typename OutputIt, typename Locale, typename... T, FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, char>::value&&
                                                            detail::is_locale<Locale>::value)>
    OutputIt format_to (OutputIt out, const Locale & loc, format_string<T...> fmt, T &&... args)

    Defined at line 4225 of file ../../third_party/fmtlib/src/include/fmt/format.h

  • template <typename Locale, typename... T, FMT_ENABLE_IF(detail::is_locale<Locale>::value)>
    size_t formatted_size (const Locale & loc, format_string<T...> fmt, T &&... args)

    Defined at line 4232 of file ../../third_party/fmtlib/src/include/fmt/format.h

  • template <typename... T>
    std::string format (format_string<T...> fmt, T &&... args)

    Formats `args` according to specifications in `fmt` and returns the result

    as a string.

    **Example**:

    #include

    <fmt

    /format.h>

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

    Defined at line 4253 of file ../../third_party/fmtlib/src/include/fmt/format.h

  • void report_error (const char * message)

    Reports a format error at compile time or, via a `format_error` exception,

    at runtime.

    This function is intentionally not constexpr to give a compile-time error.

  • template <typename T, FMT_ENABLE_IF(std::is_integral<T>::value)>
    std::string to_string (T value)

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

    **Example**:

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

    Defined at line 4266 of file ../../third_party/fmtlib/src/include/fmt/format.h

  • template <typename T, FMT_ENABLE_IF(detail::use_format_as<T>::value)>
    std::string to_string (const T & value)

    Defined at line 4274 of file ../../third_party/fmtlib/src/include/fmt/format.h

  • void vprint (string_view fmt, format_args args)
  • void vprint (FILE * f, string_view fmt, format_args args)
  • std::string vformat (string_view fmt, format_args args)
  • template <typename OutputIt, typename Locale, FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, char>::value)>
    OutputIt vformat_to (OutputIt out, const Locale & loc, string_view fmt, format_args args)

    Defined at line 4215 of file ../../third_party/fmtlib/src/include/fmt/format.h

  • void vprintln (FILE * f, string_view fmt, format_args args)
  • void vprint_buffered (FILE * f, string_view fmt, format_args args)
  • std::system_error vsystem_error (int error_code, string_view fmt, format_args args)
  • void report_system_error (int error_code, const char * message)

    Reports a system error without throwing an exception.

    Can be used to report errors from destructors.

  • template <typename TFMT_ENABLE_IF(!std::is_integral<T>::value &&
                                                                    !detail::use_format_as<T>::value)>
    std::string to_string (const T & value)

    Defined at line 4281 of file ../../third_party/fmtlib/src/include/fmt/format.h

Concepts

template <typename Ttypename Char = char> formattable is_formattable<remove_reference_t<T>, Char>::value

Defined at line 2796 of file ../../third_party/fmtlib/src/include/fmt/base.h