diff --git a/ChangeLog.rst b/ChangeLog.rst index 1284d519..ce220cd4 100644 --- a/ChangeLog.rst +++ b/ChangeLog.rst @@ -2,9 +2,9 @@ ----------- * Added an experimental unsynchronized file output API which, together with - format string compilation, can give `5-9 times speed up compared to - fprintf `__ - on common platforms: + format string compilation, can give `5-9 times speed up compared to fprintf + `__ on + common platforms: .. code:: c++ @@ -42,7 +42,8 @@ movw %dx, -2(%rax) ret - Here a single ``mov`` instruction writes ``'x'`` (``$120``) to the output buffer. + Here a single ``mov`` instruction writes ``'x'`` (``$120``) to the output + buffer. * Improved error reporting for unformattable types: now you'll get the type name directly in the error message instead of the note: @@ -65,15 +66,52 @@ https://fmt.dev/dev/api.html#udt" ... +* Added the [``make_args_checked``](https://fmt.dev/dev/api.html#argument-lists) + function template that allows you to write formatting functions with + compile-time format string checks: + + .. code:: c++ + + void vlog(const char* file, int line, fmt::string_view format, + fmt::format_args args) { + fmt::print("{}: {}: ", file, line); + fmt::vprint(format, args); + } + + template + void log(const char* file, int line, const S& format, Args&&... args) { + vlog(file, line, format, + fmt::make_args_checked(format, args...)); + } + + #define MY_LOG(format, ...) \ + log(__FILE__, __LINE__, FMT_STRING(format), __VA_ARGS__) + + MY_LOG("invalid squishiness: {}", 42); + * Fixed handling of types that have both an implicit conversion operator and an overloaded `ostream` insertion operator (`#1766 `_). +* Improved documentation + (`#1772 `_, + `#1775 `_). + Thanks `@leolchat (Léonard Gérard) `_. + +* Added the ``FMT_REDUCE_INT_INSTANTIATIONS`` CMake option that reduces the + binary code size at the cost of some integer formatting performance. This can + be useful for extremely memory-constrained embedded systems + (`#1778 `_, + `#1781 `_). + Thanks `@kammce (Khalil Estell) `_. + * Build configuration improvements (`#1760 `_, - `#1770 `_). + `#1770 `_, + `#1783 `_). Thanks `@dvetutnev (Dmitriy Vetutnev) `_, - `@xvitaly (Vitaly Zaitsev) `_. + `@xvitaly (Vitaly Zaitsev) `_, + `@tambry (Raul Tambre) `_. 7.0.3 - 2020-08-06 ------------------