From afc760263ea2a03c3f1ab97fed18df0b22d22233 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 29 Jun 2014 12:04:28 -0700 Subject: [PATCH] Update example. --- format.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/format.h b/format.h index e6a646f6..bde9bf0b 100644 --- a/format.h +++ b/format.h @@ -2195,14 +2195,12 @@ inline void FormatDec(char *&buffer, T value) { **Example**:: - std::string FormatMessage(int id, const char *format, - const fmt::ArgList &args) { - fmt::Writer w; - w.format("[{}] ", id); - w.format(format, args); - return w.str(); + void print_error(const char *file, int line, const char *format, + const fmt::ArgList &args) { + fmt::print("{}: {}: ", file, line); + fmt::print(format, args); } - FMT_VARIADIC(std::string, FormatMessage, int, const char *) + FMT_VARIADIC(void, print_error, const char *, int, const char *) \endrst */ #define FMT_VARIADIC(ReturnType, func, ...) \