0.12.0
-
[Breaking] Improved separation between formatting and buffer management.
Writeris now a base class that cannot be instantiated directly. The newMemoryWriterclass implements the default buffer management with small allocations done on stack. Sofmt::Writershould be replaced withfmt::MemoryWriterin variable declarations.
Old code:fmt::Writer w;New code:
fmt::MemoryWriter w;If you pass
fmt::Writerby reference, you can continue to do so:void f(fmt::Writer &w);This doesn't affect the formatting API.
-
Support for custom memory allocators (#69)
-
Formatting functions now accept
signed charandunsigned charstrings as arguments (#73):auto s = format("GLSL version: {}", glGetString(GL_VERSION)); -
Reduced code bloat. According to the new benchmark results, cppformat is close to
printfand by the order of magnitude better than Boost Format in terms of compiled code size. -
Improved appearance of the documentation on mobile by using the Sphinx Bootstrap theme:
| Old | New |
|---|---|
![]() |
![]() |

