8002 Commits

Author SHA1 Message Date
Tiago
e5d13d826f
Make nolocale-test actually disable locale (#4939)
nolocale-test defines FMT_STATIC_THOUSANDS_SEPARATOR, which stopped doing
anything in b90b4bc9 ("Remove FMT_STATIC_THOUSANDS_SEPARATOR in favor of
FMT_USE_LOCALE"). That macro no longer appears anywhere under include/, so
since then the target has compiled src/format.cc with locale support enabled.

It is not a dead target: the pedantic CI jobs build it (linux.yml, macos.yml
both pass -DFMT_PEDANTIC=ON), and it passes. So the configuration looks
covered while nothing actually tests it. #4627 - a locale-off build break -
landed during that window.

Define FMT_USE_LOCALE=0 instead.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-11 12:39:06 -07:00
Victor Zverovich
14174c826d Add braces for readability 2026-09-11 08:49:10 -07:00
cui fliter
6aa4a5f6f8
Fix debug string formatting for range formatters (#4936)
Signed-off-by: cuishuang <imcusg@gmail.com>
2026-09-11 08:43:46 -07:00
Victor Zverovich
1da57c78d4 Simplify calendar_padding test 2026-09-11 08:31:42 -07:00
IfkumRfnl
2012961e3e
Fix width and alignment for calendar types (#4935) 2026-09-11 08:22:02 -07:00
Victor Zverovich
56fcd0b945 Simplify named_arg_count test 2026-09-11 08:05:34 -07:00
IfkumRfnl
854fc9567a
Fix argument count in dynamic stores with named arguments (#4933) 2026-09-11 08:01:06 -07:00
ilike314272
8dc5d3f69f
Feature: dark mode docs (#4914) 2026-09-09 14:41:50 -07:00
Wu Shuwen
d566765638
Read Doxygen XML independently of the system text encoding (#4925) 2026-09-08 20:45:25 -07:00
Victor Zverovich
44f2c7ae01 Make base.h a compatibility header
Complete the header swap by making core.h canonical and updating code, tests, documentation, and tooling.
2026-09-07 17:11:35 -07:00
Victor Zverovich
e2ef4c01b2 Move the core API back to core.h
base.h was introduced as a temporary migration path; restore the primary header's original name.
2026-09-07 17:05:39 -07:00
Victor Zverovich
5543473f5e Move the compatibility header aside
Free up core.h so base.h can be renamed back with its history preserved.
2026-09-07 17:05:32 -07:00
Victor Zverovich
d3b2fac5c9 Simplify exception_ptr fallback formatting 2026-09-07 15:36:06 -07:00
IfkumRfnl
8a7aea0422
Fix out-of-bounds read in error code format parsing (#4934) 2026-09-07 11:35:29 -07:00
Victor Zverovich
7071103cea Remove incorrect chrono padding claim 2026-09-07 07:59:32 -07:00
Wu Shuwen
7fe204caed
Correct locale support in size optimization docs (#4923) 2026-09-07 07:17:52 -07:00
Jacek Caban
c07e2aa4b1
Disable std::exception_ptr and nested_exception formatters when exceptions are disabled. (#4904)
Fixes building with Clang 20 and older with -fno-exceptions, which treats
try/catch usage as an error.
2026-09-07 07:13:51 -07:00
Ethan Stoner
2d4d8a13c2
Build nolocale-test with /utf-8 on MSVC (#4919)
nolocale-test compiles src/format.cc directly, so it does not pick up the
/utf-8 that CMakeLists.txt adds to the fmt target. On MSVC the static_assert
in base.h then fires: "Unicode support requires compiling with /utf-8".

The target only exists under FMT_PEDANTIC, which the Windows workflow does not
set, so this has not shown up in CI. unicode-test already guards the same flag
the same way.
2026-09-06 13:46:11 -07:00
Victor Zverovich
8be4b46114 Bump mkdocs-material to 9.7.7 2026-09-06 12:26:04 -07:00
Alexander
67ae943b12
Add Quill to the list of notable users (#4931)
One of its unique features is that it serializes the format
string and all format arguments to the thread's SPSQ queue
to minimize processing on hotpath and then deserializes them
on the backend thread which performs formatting using {fmt}
and writing to the log sinks.

Signed-off-by: Alexander Lobakin <alobakin@mailbox.org>
2026-09-06 10:48:02 -07:00
Victor Zverovich
4fcb22bf65 Clarify compile-time benchmark results 2026-09-06 10:25:41 -07:00
Victor Zverovich
d0aae8c15a Refactor range outer formatting 2026-09-06 10:01:08 -07:00
Avionic Harshit
61e3b92396
Support fill, alignment and width in range and tuple formatters (#4910) 2026-09-06 08:47:40 -07:00
Wu Shuwen
0f3c5fd596
Fix the chrono format specification link (#4927) 2026-09-05 15:40:30 -07:00
Victor Zverovich
d90c33606c Apply cmake-format 2026-09-05 08:51:28 -07:00
Dylan Pulver
a389757209
Remove the '0' chrono padding modifier from the docs (#4917)
The '0' modifier was documented in ca8eeb09 (#3976) and the parser case for
it was removed nine days later in 7bd11b5c ("Remove a redundant extension to
reduce divergence from std::format"), which did not update the docs. Since
then the grammar and the modifier table have promised a modifier that
parse_chrono_format rejects with "invalid format", for all 11 of the
presentation types the same section lists as supporting it.

Zero padding remains the default, so the extension really was redundant;
this only aligns the documentation with the code.

Co-authored-by: Dylan Pulver <dylanpulver@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-09-05 08:33:43 -07:00
Victor Zverovich
de3660a745 Update compile-time benchmark results 2026-09-05 07:20:53 -07:00
Victor Zverovich
6226bc70b8 Enable modules by default with AppleClang 2026-09-04 16:16:19 -07:00
Victor Zverovich
3a110201c9 Use named module file option 2026-09-04 15:49:10 -07:00
Victor Zverovich
40c4f4febb Fix fcntl include in module build 2026-09-04 15:46:08 -07:00
Victor Zverovich
3894ae35ef Fix AppleClang module build 2026-09-04 15:31:24 -07:00
Victor Zverovich
1dd74c0c82 Reorder performance comparison 2026-09-04 12:54:13 -07:00
Victor Zverovich
ba24da597a Simplify performance overview 2026-09-04 12:28:26 -07:00
Victor Zverovich
8bd6079278 Update compile-time benchmark results 2026-09-04 12:13:45 -07:00
Konstantin Goncharuk
fb1a3ef342
docs: add link to a live browser demo (#4916) 2026-09-04 12:01:07 -07:00
Victor Zverovich
ce039d14fe Move migration guidance to documentation 2026-09-04 09:37:28 -07:00
Satyakam Mishra
b4b1657c2a
Fix debug format width calculation (#4902) 2026-09-04 09:17:58 -07:00
Victor Zverovich
ff4a0fdfb9 Streamline README 2026-09-04 09:13:02 -07:00
Victor Zverovich
2e6c5741d2 Move display width table out of function 2026-09-04 08:44:26 -07:00
Victor Zverovich
bc82c408a6 Test dynamic width in nested_formatter 2026-09-02 10:53:56 -07:00
Victor Zverovich
cbb264122a Simplify nested_formatter context handling
Format nested values directly through the stored formatter so dynamic
specifications resolve against the enclosing operation.
2026-09-02 10:14:09 -07:00
dependabot[bot]
c5728fb720
Bump msys2/setup-msys2 from 2.28.0 to 2.32.0 (#4908)
Bumps [msys2/setup-msys2](https://github.com/msys2/setup-msys2) from 2.28.0 to 2.32.0.
- [Release notes](https://github.com/msys2/setup-msys2/releases)
- [Changelog](https://github.com/msys2/setup-msys2/blob/main/CHANGELOG.md)
- [Commits](40677d36a5...66cd2cce69)

---
updated-dependencies:
- dependency-name: msys2/setup-msys2
  dependency-version: 2.32.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-01 10:51:53 -07:00
LJX1021403
1931ff7244
Fix typo: format-benchmarks -> format-benchmark (#4906)
Fix typo: repository name is "format-benchmark" (singular), not "format-benchmarks".
2026-09-01 10:50:09 -07:00
way4sahil
b039e624c0
Document C++20 module usage with CMake (#4891)
* Document C++20 module usage with CMake

* Added Change log

* Addressed review comments

---------

Co-authored-by: Sahil Sinha <sahil.sinha@stryker.com>
2026-08-30 10:17:00 -07:00
Tiago
f87405f21d
Suppress unused parameter warnings with FMT_USE_LOCALE=0 (#4903)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-30 08:37:51 -07:00
Avi Kivity
fa9590f63f
Apply clang-format to enum.h (#4905)
Recent changes moved away from the blessed layout.
2026-08-30 08:16:33 -07:00
Eduardo Gómez
d0cec7ae2e
Fix inconsistent display width for emoji outside East Asian Wide ranges (#4896)
* Widen display_width_of() to cover Emoji_Presentation code points

fmt::detail::display_width_of() only treated East Asian Wide/Fullwidth
code points and two hand-picked emoji ranges as two columns wide, so
emoji outside those ranges (e.g. the Dingbats block: cross mark U+274C,
white heavy check mark U+2705) were measured as one column even though
most terminals render them double-width. This produced visibly
inconsistent padding under {:^N} compared to CJK text (fixes #4851).

Replaced the ad hoc boolean expression with a sorted table of ranges
(East Asian Wide/Fullwidth plus the full Emoji_Presentation set from
Unicode's emoji-data.txt) looked up via binary search, and added
regression tests covering the original report plus edge cases:
multiple emoji, mixed emoji/CJK/ASCII content, precision truncation,
alignment/fill variants, newly covered emoji ranges, and regional
indicator (flag) pairs.

* Make wide_cp_ranges C++11-compatible; apply clang-format

* Move wide_cp_range struct into display_width_of()

* Derive wide_cp_ranges from East_Asian_Width data, restore constexpr

* Move wide_cp_ranges to display_width_of function body

* Update format.h

* Update wide_cp_ranges array to include comments

* Add inline to display_width_of and add 1F300-1F5FF and 1F900-1F9FF ranges to match [format.string.std]

* Update display_width_of lo hi varible declaration

---------

Co-authored-by: Eduardo Gomez Saldias <50159560+edugomez102@users.noreply.github.com>
2026-08-30 08:05:50 -07:00
Victor Zverovich
bb1bcede25 Stop enabling C++26 reflection by default
Don't inject -freflection when building the module, so it isn't forced onto
the module or its importers. Build enum-test unconditionally (it is a no-op
without reflection) and drop the now-unneeded reflection detection. Enable
reflection explicitly in the g++-16 C++26 CI job.
2026-08-29 16:28:09 -07:00
Victor Zverovich
9375eb3792 Simplify enum identifier handling and tidy reflection docs
Use std::string_view directly for enumerator identifiers, dropping the
identifier wrapper and inlining count_enumerators. Update the fmt/enum.h
documentation to point at cppreference and drop an inaccurate note. Also
remove the no-longer-needed -Wno-sfinae-incomplete option for format-test.
2026-08-29 15:11:31 -07:00
TheNonConformist
8a84280f26
Suppress GCC 16 incomplete type warning (#4893) 2026-08-29 15:09:36 -07:00