fmt (formerly cppformat) is an open-source formatting library. It can be used
2025-01-13 10:53:59 by Adam Ciarcinski | Files touched by this commit (2) | |
Log message:
fmtlib: updated to 11.1.2
11.1.2
Fixed ABI compatibility with earlier 11.x versions
Added wchar_t support to the std::bitset formatter
Prefixed CMake components with fmt- to simplify usage of {fmt} via add_subdirectory
Updated docs for meson
Fixed a compilation error in chrono on nvcc
Fixed various warnings
|
2024-12-29 17:49:52 by Adam Ciarcinski | Files touched by this commit (2) | |
Log message:
fmtlib: updated to 11.1.1
11.1.1
Fixed ABI compatibility with earlier 11.x versions
Defined CMake components (core and doc) to allow docs to be installed separately
11.1.0
Improved C++20 module support
Reduced debug (unoptimized) binary code size and the number of template \
instantiations when passing formatting arguments. For example, unoptimized \
binary code size for fmt::print("{}", 42) was reduced by ~40% on GCC \
and ~60% on clang (x86-64).
GCC:
Before: 161 instructions of which 105 are in reusable functions (godbolt).
After: 116 instructions of which 60 are in reusable functions (godbolt).
Clang:
Before: 310 instructions of which 251 are in reusable functions (godbolt).
After: 194 instructions of which 135 are in reusable functions (godbolt).
Added an experimental fmt::writer API that can be used for writing to different \
destinations such as files or strings
Added width and alignment support to the formatter of std::error_code.
Made std::expected<void, E> formattable.
Made fmt::is_formattable<void> SFINAE-friendly
Added support for _BitInt formatting when using clang
Added the n specifier for tuples and pairs
Added support for tuple-like types to fmt::join
Made more types formattable at compile time
Implemented a more efficient compile-time fmt::formatted_size
Fixed compile-time formatting of some string types
Made compiled version of fmt::format_to work with \
std::back_insert_iterator<std::vector<char>>
Added a formatter for std::reference_wrapper
Added experimental padding support (glibc strftime extension) to %m, %j and %Y
Made microseconds formatted as us instead of µs if the Unicode support is disabled
Fixed an unreleased regression in transcoding of surrogate pairs
Made fmt::appender satisfy std::output_iterator concept
Made std::iterator_traits<fmt::appender> standard-conforming
Made it easier to reuse fmt::formatter<std::string_view> for types with an \
implicit conversion to std::string_view
Made it possible to disable <filesystem> use via FMT_CPP_LIB_FILESYSTEM \
for compatibility with some video game console SDKs, e.g. Nintendo Switch SDK
Fixed compatibility with platforms that use 80-bit long double
Added support for UTF-32 code units greater than 0xFFFF in fill
Fixed handling of legacy encodings on Windows with GCC
Made fmt::to_string take fmt::basic_memory_buffer by const reference
Added fmt::dynamic_format_arg_store::size
Removed the ability to control locale usage via an undocumented \
FMT_STATIC_THOUSANDS_SEPARATOR in favor of FMT_USE_LOCALE.
Renamed FMT_EXCEPTIONS to FMT_USE_EXCEPTIONS for consistency with other similar \
macros.
Improved include directory ordering to reduce the chance of including incorrect \
headers when using multiple versions of {fmt}
Made it possible to compile a subset of {fmt} without the C++ runtime.
Improved documentation and README
Improved the documentation generator
Improved CI
Fixed various warnings and compilation issues
|
2024-08-25 08:19:21 by Thomas Klausner | Files touched by this commit (575) |
Log message:
*: replace CMAKE_ARGS with CMAKE_CONFIGURE_ARGS
|
2024-07-20 20:52:16 by Adam Ciarcinski | Files touched by this commit (2) | |
Log message:
fmtlib: updated to 11.0.2
11.0.2
Fixed compatibility with non-POSIX systems
Fixed performance regressions when using std::back_insert_iterator with \
fmt::format_to
Fixed handling of std::generator and move-only iterators
Made formatter<std::string_view>::parse work with types convertible to \
std::string_view
Made volatile void* formattable
Made Glib::ustring not be confused with std::string
Made fmt::context iterator compatible with STL algorithms that rely on iterator \
category
|
2024-07-16 12:02:05 by Patrick Welche | Files touched by this commit (42) |
Log message:
Revbump for fmtlib 11.0.1
Pointed out by David Gutteridge on pkgsrc-changes
|
2024-07-10 13:03:17 by Patrick Welche | Files touched by this commit (3) |
Log message:
Update fmtlib to 11.0.1
Many improvemnts. Highlights include:
- Added formatters for `std::chrono::day`, `std::chrono::month`,
`std::chrono::year` and `std::chrono::year_month_day`
- Fixed handling of precision in `%S` (https://github.com/fmtlib/fmt/issues/3794,
- Added a formatter for `std::complex`
- Added a formatter for `std::expected`
- Added a formatter for `std::type_info`
and much faster compile times even without using the new cut down
fmt/base.h which provides the printf() equivalent family of functions.
For a full list see https://github.com/fmtlib/fmt/blob/11.0.1/ChangeLog.md
|
2024-01-04 19:42:57 by Adam Ciarcinski | Files touched by this commit (3) | |
Log message:
fmtlib: updated to 10.2.1
10.2.1 - 2024-01-03
- Fixed ABI compatibility with earlier 10.x versions
10.2.0 - 2024-01-01
- Added support for the `%j` specifier (the number of days) for
`std::chrono::duration`
- Added support for the chrono suffix for days and changed
the suffix for minutes from "m" to the correct "min"
For example ([godbolt](https://godbolt.org/z/9KhMnq9ba)):
```c++
#include <fmt/chrono.h>
int main() {
fmt::print("{}\n", std::chrono::days(42)); // prints "42d"
}
```
- Fixed an overflow in `std::chrono::time_point` formatting with large dates
- Added a formatter for `std::source_location`
For example ([godbolt](https://godbolt.org/z/YajfKjhhr)):
```c++
#include <source_location>
#include <fmt/std.h>
int main() {
fmt::print("{}\n", std::source_location::current());
}
```
prints
```
/app/example.cpp:5:51: int main()
```
- Added a formatter for `std::bitset`
```c++
#include <bitset>
#include <fmt/std.h>
int main() {
fmt::print("{}\n", std::bitset<6>(42)); // prints \
"101010"
}
```
- Added an experimental `nested_formatter` that provides an easy way of
applying a formatter to one or more subobjects while automatically handling
width, fill and alignment. For example:
```c++
#include <fmt/format.h>
struct point {
double x, y;
};
template <>
struct fmt::formatter<point> : nested_formatter<double> {
auto format(point p, format_context& ctx) const {
return write_padded(ctx, [=](auto out) {
return format_to(out, "({}, {})", nested(p.x), nested(p.y));
});
}
};
int main() {
fmt::print("[{:>20.2f}]", point{1, 2});
}
```
prints
```
[ (1.00, 2.00)]
```
- Added the generic representation (`g`) to `std::filesystem::path`
```c++
#include <filesystem>
#include <fmt/std.h>
int main() {
fmt::print("{:g}\n", std::filesystem::path("C:\\foo"));
}
```
prints `"C:/foo"` on Windows.
- Made `format_as` work with references
- Fixed formatting of invalid UTF-8 with precision
- Fixed an inconsistency between `fmt::to_string` and `fmt::format`
- Disallowed unsafe uses of `fmt::styled`
```c++
auto s = fmt::styled(std::string("dangle"), fmt::emphasis::bold);
fmt::print("{}\n", s); // compile error
```
Pass `fmt::styled(...)` as a parameter instead.
- Added a null check when formatting a C string with the `s` specifier
- Disallowed the `c` specifier for `bool`
- Made the default formatting unlocalized in `fmt::ostream_formatter` for
consistency with the rest of the library
- Fixed localized formatting in bases other than decimal
- Fixed a performance regression in experimental `fmt::ostream::print`
- Added synchronization with the underlying output stream when writing to
the Windows console
- Changed to only export `format_error` when {fmt} is built as a shared
library
- Made `fmt::streamed` `constexpr`.
- Enabled `consteval` on older versions of MSVC
- Added an option to build without `wchar_t` support on Windows
- Improved build and CI configuration
- Fixed various warnings, compilation and test issues
- Improved documentation and README
- Updated CI dependencies
|
2023-08-29 09:08:09 by Adam Ciarcinski | Files touched by this commit (4) | |
Log message:
fmtlib: updated to 10.1.1
10.1.1
Added formatters for std::atomic and atomic_flag
Fixed an error about partial specialization of formatter<string> after \
instantiation when compiled with gcc and C++20
Fixed compilation as a C++20 module with gcc and clang
Made fmt::to_string work with types that have format_as overloads
Made formatted_size work with integral format specifiers at compile time
Fixed a warning about the no_unique_address attribute on clang-cl
Improved compatibility with the legacy GBK encoding
Added OpenSSF Scorecard analysis
Updated CI dependencies
|