Update example.

This commit is contained in:
Victor Zverovich 2014-06-29 12:04:28 -07:00
parent e882db900d
commit afc760263e

View File

@ -2195,14 +2195,12 @@ inline void FormatDec(char *&buffer, T value) {
**Example**::
std::string FormatMessage(int id, const char *format,
void print_error(const char *file, int line, const char *format,
const fmt::ArgList &args) {
fmt::Writer w;
w.format("[{}] ", id);
w.format(format, args);
return w.str();
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, ...) \