Commit Graph
3356 Commits
Author SHA1 Message Date
Yuwei Zhao 4cce5f458d Perf: Optimize function append in include/fmt/base.h (#4541) 2025-09-21 12:40:26 -07:00
CrackedMatter b18ece7d71 Export is_compiled_string and operator""_cf (#4544) 2025-09-19 08:54:54 -07:00
Victor Zverovich ddd20d57ec Bump version 2025-09-17 09:14:47 -07:00
Victor Zverovich a3b3d7ed46 Simplify duration cast 2025-09-13 11:32:03 -07:00
Victor Zverovich 83189189a1 Remove get_dynamic_spec 2025-09-13 10:38:50 -07:00
Victor Zverovich 9bb14ffc47 Remove deprecated APIs 2025-09-13 10:07:16 -07:00
Victor Zverovich 556c4177b6 Remove deprecated localtime 2025-09-13 09:41:24 -07:00
Victor Zverovich bfdef8b15d Remove deprecated functions 2025-09-13 09:25:53 -07:00
Victor Zverovich 609188cb92 Cleanup macro definitions 2025-09-07 07:44:49 -07:00
Anas 0a94e06750 Combined emphases into a single escape sequence (#4528) 2025-09-05 09:50:56 -07:00
Victor Zverovich 619b3a5aa0 Suppress a false positive in clang-tidy 2025-09-01 11:42:00 -07:00
Victor Zverovich 79c7f8a70b Apply clang-tidy 2025-09-01 10:49:49 -07:00
Victor Zverovich 20e0d6d8dd Update docs 2025-09-01 10:15:54 -07:00
Victor Zverovich 02fb76d69b Add FMT_STATIC_FORMAT 2025-09-01 09:15:32 -07:00
Victor Zverovich a57f196cad Apply coding conventions 2025-09-01 07:24:08 -07:00
Victor Zverovich 13d4f8469e Remove deprecated vformat_to 2025-08-31 10:02:36 -07:00
Victor Zverovich e2f89e6d21 Remove deprecated aliases 2025-08-31 09:40:11 -07:00
Victor Zverovich 489fd7ca4b Simplify locale handling 2025-08-31 09:33:43 -07:00
Victor Zverovich 69324379f2 Mark detail::assert_fail as deprecated 2025-08-31 08:11:57 -07:00
Björn Schäpers ff1caa58c9 Use FMT_THROW in report_error (#4521)
With exceptions: No change (if FMT_THROW is not user provided)

Without exceptions: Now also states where it comes from (report_error)
and uses fprintf instead of fputs.

My motivation is, now that I have my own fmt::assert_failed, also to get
rid of fputs for my embedded build.
2025-08-31 08:05:54 -07:00
Björn Schäpers e181e94140 Add FMT_CUSTOM_ASSERT_FAIL (#4505)
That way one can provide ones own implementation for assert_fail, which
is moved out of the detail namespace. For binary compatibility the
detail version stays to call the outer version.
2025-08-25 09:02:00 -07:00
Victor Zverovich 8e4676e4a5 Remove deprecated template parameter 2025-08-24 09:52:17 -07:00
Victor Zverovich b5c4d25cd1 Rename is_char to is_code_unit 2025-08-24 09:30:50 -07:00
Victor Zverovich a77efa4b4a Move is_*char to detail 2025-08-24 09:16:18 -07:00
Victor Zverovich e7e71009c7 Make FP formatting compatible with exotic chars 2025-08-24 08:49:54 -07:00
Victor Zverovich b7b261977e Simplify report_error 2025-08-24 08:30:17 -07:00
Victor Zverovich 61e0503daf Merge workarounds for bogus MSVC warnings 2025-08-24 08:18:47 -07:00
Victor Zverovich 72c82296d6 Put FMT_END_* together 2025-08-17 12:25:40 -07:00
Victor Zverovich a402614e8c Remove deprecated aliases 2025-08-17 11:52:00 -07:00
Victor Zverovich e719c43cc6 Apply coding conventions 2025-08-17 10:59:16 -07:00
Victor Zverovich 8a8ff6177c Remove deprecated and undocumented has_formatter 2025-08-17 10:52:45 -07:00
Victor Zverovich 5b99b334f0 Remove redundant else 2025-08-17 10:03:01 -07:00
Mattias Ljungström 9588458917 Silence unreachable code warnings in MSVC when FMT_USE_EXCEPTIONS are disabled. (#4515) 2025-08-17 09:35:28 -07:00
Victor Zverovich 7ffc3ca15b Minor cleanup 2025-08-16 12:20:02 -07:00
Victor Zverovich e9ddc97b9a Remove unnecesary constexpr and inline more 2025-08-10 08:40:35 -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 Chernyakin 8f3a965186 Refactor ansi_color_escape to track size instead of using a null terminator (#4511) 2025-08-09 08:08:41 -07:00
Victor Zverovich add164f6b3 Optimize the default FP formatting 2025-08-03 12:46:38 -07:00
Victor Zverovich 23059d558e Fix exponent size computation 2025-08-03 10:00:24 -07:00
Victor Zverovich 505cc3d0c2 Simplify remove_trailing_zeros 2025-08-03 08:45:48 -07:00
Victor Zverovich b8a502615d Revert "Optimize the default FP formatting"
This reverts commit 93f03953af.
2025-08-03 07:40:13 -07:00
Victor Zverovich 93f03953af Optimize the default FP formatting 2025-07-27 08:56:07 -07:00
Dominic Pöschko 35dcc58263 fix buffer overflow on all emphasis flags set (#4498) 2025-07-20 10:43:33 -07:00
Catherine 553ec11ec0 Make compatible with WASI (#4497)
WASI is a POSIX subset that doesn't have `dup`, `dup2`, or `pipe` system calls.

Fixes #4496.
2025-07-14 15:51:04 -07:00
Victor Zverovich 7d29ebe4af Minor cleanup 2025-07-12 07:09:38 -07:00
anonymous 20c8fdad06 Fix import std in clang++ (#4488)
fix module-compilation error when defined `FMT_IMPORT_STD`
2025-07-07 11:47:48 -07:00
Victor Zverovich 300ce75ca6 Handle invalid glibc FILE buffer 2025-07-06 11:17:16 -07:00
Victor Chernyakin 2fa3e1a1bb Fix interaction between debug presentation, precision, and width for strings (#4478) 2025-07-04 07:33:47 -07:00
Miuna 27c5aab349 Fix unwanted char promotion in decimal writer with wchar_t (#4483) 2025-07-01 07:03:57 -07:00
Miuna 353bd895a2 Add FMT_EXPORT on ranges.h customization points (#4476) 2025-06-24 10:30:44 -07:00