Update format.h
This commit is contained in:
parent
8615ff2acc
commit
15f363ab3a
@ -3830,6 +3830,8 @@ struct rgb {
|
||||
|
||||
void vprint_rgb(rgb fd, string_view format, format_args args);
|
||||
void vprint_rgb(rgb fd, rgb bg, string_view format, format_args args);
|
||||
void vprint_rgb(rgb fd, wstring_view format, wformat_args args);
|
||||
void vprint_rgb(rgb fd, rgb bg, wstring_view format, wformat_args args);
|
||||
|
||||
/**
|
||||
Formats a string and prints it to stdout using ANSI escape sequences to
|
||||
@ -3842,6 +3844,17 @@ inline void print(rgb fd, string_view format_str, const Args & ... args) {
|
||||
vprint_rgb(fd, format_str, make_format_args(args...));
|
||||
}
|
||||
|
||||
/**
|
||||
Formats a string and prints it to stdout using ANSI escape sequences to
|
||||
specify foreground color 'fd'.
|
||||
Example:
|
||||
fmt::print(fmt::color::red, L"Elapsed time: {0:.2f} seconds", 1.23);
|
||||
*/
|
||||
template <typename... Args>
|
||||
inline void print(rgb fd, wstring_view format_str, const Args & ... args) {
|
||||
vprint_rgb(fd, format_str, make_format_args<wformat_context>(args...));
|
||||
}
|
||||
|
||||
/**
|
||||
Formats a string and prints it to stdout using ANSI escape sequences to
|
||||
specify foreground color 'fd' and background color 'bg'.
|
||||
@ -3852,6 +3865,17 @@ template <typename... Args>
|
||||
inline void print(rgb fd, rgb bg, string_view format_str, const Args & ... args) {
|
||||
vprint_rgb(fd, bg, format_str, make_format_args(args...));
|
||||
}
|
||||
|
||||
/**
|
||||
Formats a string and prints it to stdout using ANSI escape sequences to
|
||||
specify foreground color 'fd' and background color 'bg'.
|
||||
Example:
|
||||
fmt::print(fmt::color::red, fmt::color::black, L"Elapsed time: {0:.2f} seconds", 1.23);
|
||||
*/
|
||||
template <typename... Args>
|
||||
inline void print(rgb fd, rgb bg, wstring_view format_str, const Args & ... args) {
|
||||
vprint_rgb(fd, bg, format_str, make_format_args<wformat_context>(args...));
|
||||
}
|
||||
#endif // FMT_EXTENDED_COLORS
|
||||
|
||||
#if FMT_USE_USER_DEFINED_LITERALS
|
||||
|
||||
Loading…
Reference in New Issue
Block a user