Download Latest Version 12.1.0 source code.tar.gz (711.5 kB)
Email in envelope

Get an email when there's a new version of fmt

Home / 11.2.0
Name Modified Size InfoDownloads / Week
Parent folder
fmt-11.2.0.zip 2025-05-03 1.4 MB
11.2.0 source code.tar.gz 2025-05-03 705.4 kB
11.2.0 source code.zip 2025-05-03 761.6 kB
README.md 2025-05-03 3.1 kB
Totals: 4 Items   2.9 MB 0
  • Added the s specifier for std::error_code. It allows formatting an error message as a string. For example:

```c++ #include <fmt/std.h>

int main() { auto ec = std::make_error_code(std::errc::no_such_file_or_directory); fmt::print("{:s}\n", ec); } ```

prints

No such file or directory (The actual message is platform-specific.)

```c++ #include <fmt/chrono.h>

int main() { std::chrono::zoned_time zt( std::chrono::current_zone(), std::chrono::system_clock::now()); fmt::print("{}", zt.get_local_time()); } ```

is now formatted consistenly across platforms.

  • Added diagnostics for cases when timezone information is not available. For example:

c++ fmt::print("{:Z}", std::chrono::local_seconds());

now gives a compile-time error.

Source: README.md, updated 2025-05-03