3447 Commits

Author SHA1 Message Date
aizu-m
128ba144ab
fix out-of-bounds read in basic_format_args::get (#4800) 2026-06-09 22:18:35 -07:00
Ferdinand Bachmann
ffd8397db1
Add fmt_print to C API (#4789)
* Add FMT_FORMAT_ARGS(fmt, ...) macro to C API to simplify user-defined format wrappers

* Add fmt_print to C API
2026-06-05 06:40:30 -07:00
Victor Zverovich
70f794e395 Bump version 2026-06-02 15:16:15 -07:00
Jiami Lin
a90ad5d6fd
Fix formatting std::tm with null tm_zone (#4790) 2026-06-01 18:16:49 -07:00
Victor Zverovich
46cf422f54 Unify copyright notices 2026-05-31 08:54:06 -07:00
Victor Zverovich
a823ba0699 Deconstexprify exception formatter 2026-05-31 08:24:38 -07:00
j4niwzis
029d543768
Fix compile time format for ranges, style, and std (#4759) 2026-05-31 08:21:35 -07:00
ahoarau
0acf106c52
Add println functions for formatted output with color support (#4782) 2026-05-25 08:30:36 -07:00
Victor Zverovich
93e26fa578 Cleanup is_contiguous 2026-05-22 08:04:50 -07:00
Vladislav Shchapov
a30cf7d1ad
Provide reasonable default definition for is_contiguous (#4770)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2026-05-21 07:19:19 -07:00
theflashwin
2f18a88e68 fix GCC PCH Breakage Triggered by fmt Scoped #pragma GCC optimize(0g) 2026-05-11 07:20:40 -07:00
Vladislav Shchapov
9cb8c0f92b
Fix ambiguous formatter<std::optional<T>> between fmt/std.h and fmt/ranges.h on C++26 (P3168R2) (#4761)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2026-05-03 07:37:46 -07:00
Victor Zverovich
5a9a184448 Apply clang-format 2026-05-03 07:33:53 -07:00
Kağan Can Şit
d0e3d20af8
chore(IWYU):Remove redundant includes (#4758) 2026-04-29 20:50:56 -07:00
Victor Zverovich
432fda7bfa Fix false positive in tsan (fixes #4755) 2026-04-29 17:16:36 -07:00
user202729
eeff8680ed
Avoid dropping null byte in format string (#4732)
* Avoid dropping null byte in format string

* Add a test for null byte in format string
2026-04-23 09:34:27 -07:00
Victor Zverovich
27d0c03c4d Minor cleanup 2026-04-12 09:50:12 -07:00
Cazadorro
03cfb8645e
Workaround a CUDA issue in handing UTF-32 literals (#4719) 2026-04-10 16:28:52 -07:00
Raúl Marín
4ccf1d4faf
Fix out-of-bounds read in vprintf with trailing '%' (#4742) 2026-04-10 12:23:57 -07:00
Mike Vastola
be98ea8add
Fix bug re: return type of f(un)lockfile wrappers for Windows (#4739)
Just a tiny bugfix I spotted: The `f(un)lockfile` wrappers in
`format-inl.h` that wrap Windows's `_(un)lock_file` methods are
defined with a trailing return type derived by using decltype on a
hypothetical call to the underlying functions.

The wrappers don't contain a `return` in their bodies, however, so if
the return type of the underlying functions were to ever change from
`void`, there would be a compile error. This just adds `return` to each.
2026-04-10 08:01:13 -07:00
Victor Zverovich
d2a159fbe7 Apply clang-format 2026-04-03 17:35:28 -07:00
Victor Zverovich
602df7dab8 Simplify copy 2026-03-28 09:33:45 -07:00
user202729
7b2c4d064b
Speed up iterator_buffer (#4679) 2026-03-25 07:38:47 -07:00
Victor Zverovich
dc05bee307 Don't assume nul termination in printf
Thanks ZUENS2020 for reporting.
2026-03-23 13:28:26 -07:00
sunmy2019
ea85b81ccd
Support fmt::runtime with wchar_t in fmt::format_to_n (#4715) 2026-03-21 17:10:17 -07:00
Victor Chernyakin
ae6fd83e2e
Make fmt/fmt-c.h compile with Clang on Windows (#4712) 2026-03-13 17:51:48 -07:00
Aaron Gokaslan
c0cd0fcfec
Add missing moves to grouping std::string member (#4704) 2026-03-11 09:52:40 -07:00
Victor Zverovich
c29b64dde7 Cleanup the C API 2026-03-08 14:33:23 -07:00
Ferdinand Bachmann
eb03303099
Replace the dummy arg from compound initializers in the C API with more macro magic (#4696)
The dummy argument {fmt_int} was there as a workaround for MSVC and to
avoid needing to rely on another GCC extension for zero-size arrays. Use
macro magic similar to FMT_NARG() instead that replaces the problematic
zero-size array with NULL.

In order to avoid a quadratic number of expansions, defer creating the
mapped argument list until after selection of whether to use NULL or
the fmt_arg array.

Signed-off-by: Ferdinand Bachmann <ferdinand.bachmann@yrlf.at>
2026-03-07 07:55:51 -08:00
Victor Zverovich
c8a6fd9177 Minor cleanup 2026-03-05 16:52:21 -08:00
Victor Zverovich
d38881410a Deprecated initializer_list join 2026-03-05 16:42:07 -08:00
Yancey
8277ee6aa0
Update fmt::join to support more character types (#4686) 2026-03-04 08:14:08 -08:00
Victor Zverovich
af9bb5c075 Mark detail::named_arg as deprecated 2026-03-03 08:22:10 -08:00
TPPPP
db4bea83d6
Move named_arg to public API (#4687) 2026-02-28 15:34:39 -08:00
Bernd Petrovitsch
82553a7a5b
wrap macro arguments in parentheses for robustness (#4681)
Co-authored-by: Bernd Petrovitsch <bernd@sysprog.at>
2026-02-24 10:20:12 -08:00
Aaron Gokaslan
8d3f731763
Mark static arrays as constexpr for binary opt (#4680) 2026-02-23 17:08:35 -08:00
Victor Zverovich
60d5d0cec6 Workaround broken _Generic in MSVC 2026-02-21 15:04:38 -08:00
Victor Zverovich
9e5bb7ef77 Cleanup the C API 2026-02-21 11:46:23 -08:00
Soumik15630m
1dc644e021
Add C11 API with type-safe formatting (#4663) (#4671) 2026-02-16 07:06:32 -08:00
Stéén
b35de87ad9
std.h: Allow formatting std::unexpected type. (#4675)
In some cases, people might want to format the std::unexpected type itself,
independent of the value type, this commit makes it possible.

Co-authored-by: Robin Oger <robin.oger.work@gmail.com>
2026-02-11 15:06:59 -08:00
Ruriwo
2d7dc922c6
Suppress warning C4305 (#4668) 2026-02-06 09:37:08 -08:00
ssszcmawo
28b082cc2b
Cleanup documentation (#4667)
* Cleanup documentation

* Fix comment typo in fmt::formatter struct

* Fix formatting and grammar in api.md

Corrected formatting and grammar in the API documentation.
2026-02-04 18:47:47 -08:00
Mike Vastola
2eda43e9be
Add FMT_USE_FLOCKFILE macro to force has_flockfile trait to false (#4666)
Fixes fmtlib/fmt#4646
2026-02-03 12:45:07 -08:00
Victor Zverovich
eb99f6eba6 Move std::byte formatter to std.h 2026-02-03 10:16:20 -08:00
Victor Zverovich
b98926b73b uint128_fallback -> uint128 2026-02-02 19:13:14 -08:00
Victor Zverovich
6322cf0520 int128_opt -> native_int128 2026-02-02 18:17:30 -08:00
Victor Zverovich
8dfd23651c Cleanup 2026-02-02 17:30:46 -08:00
Victor Zverovich
3f98b54bd7 Move _BitInt next to bitref formatter 2026-02-02 17:08:10 -08:00
Victor Zverovich
27b7be63bf Remove unnecessary pragmas 2026-02-02 11:40:58 -08:00
Victor Zverovich
48967e1b6f Cleanup named args 2026-02-02 11:08:01 -08:00