mirror of
https://github.com/fmtlib/fmt.git
synced 2025-12-07 01:06:53 +08:00
Update changelog
This commit is contained in:
parent
f9face7147
commit
e33c76a1c2
21
ChangeLog.md
21
ChangeLog.md
@ -26,6 +26,27 @@
|
|||||||
https://github.com/fmtlib/fmt/pull/4495).
|
https://github.com/fmtlib/fmt/pull/4495).
|
||||||
Thanks @arBmind, @tkhyn, @Mishura4, @anonymouspc and @autoantwort.
|
Thanks @arBmind, @tkhyn, @Mishura4, @anonymouspc and @autoantwort.
|
||||||
|
|
||||||
|
- Added `FMT_STATIC_FORMAT` that allows formatting into a string of the exact
|
||||||
|
required size at compile time.
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
```c++
|
||||||
|
#include <fmt/compile.h>
|
||||||
|
|
||||||
|
constexpr auto s = FMT_STATIC_FORMAT("{}", 42);
|
||||||
|
```
|
||||||
|
|
||||||
|
compiles to just
|
||||||
|
|
||||||
|
```s
|
||||||
|
__ZL1s:
|
||||||
|
.asciiz "42"
|
||||||
|
```
|
||||||
|
|
||||||
|
It can be accessed as a C string with `s.c_str()` or as a string view with
|
||||||
|
`s.str()`.
|
||||||
|
|
||||||
- Switched to using estimated display width in precision. For example:
|
- Switched to using estimated display width in precision. For example:
|
||||||
|
|
||||||
```c++
|
```c++
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user