740 Commits

Author SHA1 Message Date
Victor Zverovich 7852fc384c Fix out-of-range integers with the 'c' presentation type (#4839)
Formatting an integer with ':c' used the magnitude (abs_value) and never
range-checked, so negatives were mangled and out-of-range values silently
truncated. Copy the value as a character and report an error when it is out
of range, treating all character types as unsigned for portability.
2026-07-17 11:36:52 -07:00
Vinay Kumar 588b3a0f8f Fix fallback uint128 bitwise not (#4813) 2026-06-17 23:52:12 -07:00
Victor Zverovich 979c94dff8 Fix hang/assertion when printing to a pipe with closed read end (#4797) 2026-06-18 08:08:44 +02:00
Victor Zverovich 46cf422f54 Unify copyright notices 2026-05-31 08:54:06 -07:00
Kağan Can Şit 9396f77fe4 Remove unused header includes in test files (#4729) 2026-04-05 18:40:48 -07:00
Victor Zverovich dc05bee307 Don't assume nul termination in printf
Thanks ZUENS2020 for reporting.
2026-03-23 13:28:26 -07: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 3f98b54bd7 Move _BitInt next to bitref formatter 2026-02-02 17:08:10 -08:00
Victor Zverovich 45ed657df3 Cleanup locking 2026-02-01 11:09:19 -08:00
Victor Zverovich 26c6b1c23d Move copy to format.h 2026-01-29 21:30:20 -08:00
Victor Zverovich 45f230b9b2 Remove const_check 2026-01-29 20:18:18 -08:00
Victor Zverovich 3391f9e992 Cleanup test 2025-11-22 19:14:32 -08:00
Victor Zverovich a6fb4d3b06 Remove invalid tests 2025-11-22 07:00:06 -08:00
Victor Zverovich f91dc80f4c Minor cleanup 2025-08-16 14:49:26 -07:00
Victor Zverovich 4120581167 Minor cleanup 2025-08-16 14:20:06 -07:00
Victor Zverovich 7ffc3ca15b Minor cleanup 2025-08-16 12:20:02 -07:00
Murat Toprak 0d145936ec Handle allocator propagation in basic_memory_buffer::move, Fix #4487 (#4490)
* Handle allocator propagation in basic_memory_buffer::move

Update `basic_memory_buffer::move` to respect `propagate_on_container_move_assignment`allocator trait.
If the allocator should not propagate and differs from the target's allocator,
fallback to copying the buffer instead of transferring ownership.

This avoids potential allocator mismatch issues and ensures exception safety.

* Add test cases for the updated move ctor

- Added two test cases `move_ctor_inline_buffer_non_propagating` and `move_ctor_dynamic_buffer_non_propagating`
- Added `PropageteOnMove` template parameter to `allocator_ref` class to be compatible with the old test cases
- `allocator_ref` now implements `!=` and `==` operators
2025-08-09 08:14:15 -07:00
Victor Zverovich 300ce75ca6 Handle invalid glibc FILE buffer 2025-07-06 11:17:16 -07:00
Victor Zverovich 6a3b40524c Use actual example code and move safe_fopen to os-test 2025-07-04 09:50:55 -07:00
Victor Chernyakin 2fa3e1a1bb Fix interaction between debug presentation, precision, and width for strings (#4478) 2025-07-04 07:33:47 -07:00
Victor Zverovich fc0c76a075 Handle large precision 2025-06-01 08:49:41 -07:00
Victor Zverovich befbc5fdb8 Fix ADL lookup for memory_buffer 2025-05-26 09:44:35 -07:00
Victor Zverovich 8aa1d6a9fb Minor cleanup 2025-05-25 10:14:24 -07:00
Nikhil 6d79757a38 Interpret precision as display width (#4443) 2025-05-25 08:42:47 -07:00
Victor Chernyakin b5266fd3b9 Remove some redundant consts (#4445)
`constexpr` variables are implicitly `const`.
2025-05-12 10:41:58 -07:00
Victor Zverovich 448929d491 Update and apply clang-format 2025-05-03 07:29:31 -07:00
Victor Zverovich c81cbed2b7 Simplify test 2025-04-23 12:32:26 -07:00
LocalSpook c709138359 Add support for incomplete types 2025-04-20 10:16:11 -07:00
Victor Zverovich 2f58430573 Move buffering tests to os-test 2025-03-30 09:38:40 -07:00
Dean Glazeski 37e6474718 Fix dynamic named arg format spec handling (#4361)
When dealing with dynamic named format args, need to account for
nested named args when skipping the content of the replacement.

Fixes #4360
2025-03-15 09:34:11 -07:00
Victor Zverovich 9212ff6ca1 Apply coding conventions and use constexpr 2025-03-02 09:03:06 -08:00
Dean Glazeski 864bdf9638 Report error on duplicate named arg names (#4367) 2025-03-02 07:47:03 -08:00
Victor Zverovich 52eeeb52a6 Make exponent threshold depend on representation (#3649) 2025-01-26 12:10:48 -08:00
Vladislav Shchapov 898d438571 Fix formatting into std::ostreambuf_iterator using a compiled format (#4312)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2025-01-18 07:16:06 -08:00
Victor Zverovich a35389b3c2 Corrently handle buffer flush 2024-11-09 10:56:31 -08:00
Victor Zverovich a197a994c5 Add member format_as for std 2024-09-20 08:49:49 -07:00
Victor Zverovich 1782a6eac0 Rename pragma macros 2024-09-12 19:20:32 -07:00
Victor Zverovich 689ec7a087 Cleanup 2024-09-11 16:05:34 -07:00
Victor Zverovich 1bde49e545 Remove FMT_USE_USER_LITERALS 2024-09-11 11:27:27 -07:00
Victor Zverovich f5a16a484b Cleanup 2024-09-06 12:41:53 -07:00
Victor Zverovich 894b71da85 Fix handling of _BitInt 2024-09-03 11:32:31 -07:00
Victor Zverovich 60740b7c24 Cleanup base API 2024-09-01 19:35:00 -07:00
Victor Zverovich 6797f0c39a Cleanup compile-time checks 2024-08-31 11:26:27 -07:00
Victor Zverovich 377cf203e3 Add opt out for built-in types 2024-08-29 11:21:29 -07:00
Justin Riddell 5a0a37340c Add support for _BitInt on clang (#4072)
Issue #4007
Make _BitInt up to 128bits formattable
Note, libstdc++ is_signed doesn't work with _BitInt (so use own)
2024-08-28 18:57:52 -07:00
Victor Zverovich 62382e3650 Test full exponent range 2024-08-18 06:47:04 -07:00
Victor Zverovich 94b8bc8eae Add an experimental writer API 2024-08-17 09:54:09 -07:00
Victor Zverovich 928a07bb04 Simplify handling of dynamic specs 2024-08-04 09:09:01 -07:00
Victor Zverovich 7891699737 Simplify handling of dynamic specs 2024-08-04 08:47:07 -07:00