Commit Graph

7682 Commits

Author SHA1 Message Date
J. Berger
c3be070b7e When using MSVC x86 to compile v12.0.0 or v12.1.0, conversions from __int64 to a 32bit unsigned int trigger warnings. (#4594)
This is a follow-up for PR #4572.
2025-11-01 09:38:30 -07:00
Stéén
27bf8b47fe Add FMT_CONSTEXPR to static_format_result members (#4591)
Co-authored-by: Robin Oger <roger@qcify.com>
2025-10-29 18:34:42 -07:00
Victor Zverovich
407c905e45 Update version 12.1.0 2025-10-29 07:40:27 -07:00
Victor Zverovich
f781d2b932 Update ChangeLog.md 2025-10-25 09:10:24 -07:00
Victor Zverovich
5987082c47 Bump version 2025-10-25 08:30:50 -07:00
Victor Zverovich
681c9e689b Update changelog 2025-10-25 08:30:50 -07:00
Peter Hill
913507044b Fix leaky diagnostic ignored pragma (#4588)
Ignoring the `-Wconversion` diagnostic in `make_format_args` was
leaking out of the header, resulting in that warning being ignored in
downstream code that includes `fmt/base.h`.

Instead, we should `push`/`pop` the diagnostics to ensure this is
cleaned up.
2025-10-25 08:28:24 -07:00
Victor Zverovich
ff357e9e4a Remove extra whitespace 2025-10-25 08:10:57 -07:00
Victor Zverovich
728dfeab5b Fix apidoc comment 2025-10-25 08:06:23 -07:00
Victor Zverovich
7adc922ebb Update changelog 2025-10-25 08:02:24 -07:00
Victor Zverovich
70ed0ab82a Update changelog 2025-10-25 07:51:29 -07:00
Victor Zverovich
b95fd6132b Avoid an ABI break for clang 2025-10-25 07:17:41 -07:00
Victor Zverovich
7241bbb149 Update changelog 2025-10-22 15:32:15 -07:00
Victor Zverovich
c0ddbacfd3 Bump version 2025-10-22 15:32:15 -07:00
Victor Zverovich
9395ef5fcb Don't include std::locale::collate value in the symbol 2025-10-22 13:48:13 -07:00
Victor Zverovich
9721d974fc Workaround ABI compatibility between clang and gcc 2025-10-22 12:34:47 -07:00
Fatih BAKIR
d6bdb69c62 Move FMT_API from ostream class to members (#4584)
Putting FMT_API on the class definition propagates it to the base class
detail::buffer<char>'s members. However, MSVC not emit definitions for
inline members unless it sees the symbols as FMT_API when compiling.

This fix removes the FMT_API declaration from the class itself and marks
individual non-inline members as FMT_API to address the issue.

Fixes https://github.com/fmtlib/fmt/issues/4576
2025-10-20 07:49:23 -07:00
Victor Zverovich
08d38d6e78 Make error_code formatter debug-enabled 2025-10-19 10:35:45 -07:00
Victor Zverovich
a2289b8593 Fix the build 2025-10-19 10:30:42 -07:00
Victor Zverovich
e8da5ba275 Fix formatting 2025-10-19 10:22:39 -07:00
Victor Zverovich
e2aa06cd0a Workaround ABI incompatibility between clang ang gcc 2025-10-19 08:40:13 -07:00
Vladislav Shchapov
85f6ecc7a0 Add format_as support for std::variant and std::expected formatters (#4575)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2025-10-18 14:05:21 -07:00
Harry Denholm
378a5ab3c1 value-initialise the buffer array member of detail::ansi_color_escape so that it can be used in a constexpr context in MSVC; compiler rejects as non-constant due to 'uninitialized symbol' otherwise (#4581)
Co-authored-by: Harry Denholm <ishani@users.noreply.github.com>
2025-10-17 08:10:56 -07:00
John Zimmerman
656d14db8b docs: format two unescaped printf references with backticks (#4578) 2025-10-16 11:27:51 -07:00
Justin Riddell
31bed1bb65 Fix module fmt::join<string_view> (#4577)
FMT_USE_STRING_VIEW define was incorrectly not being defined when using
modules, so there was no appropriate formatter specialization for
std::string_view
Fixes #4379
2025-10-16 11:25:19 -07:00
LiangHu
8eebb4334b [fix] #4565 When using MSVC to compile v12.0.0, many compilation warn… (#4572) 2025-10-12 10:56:13 -07:00
Victor Zverovich
beefc1c14f Tweak wording 2025-10-12 10:54:28 -07:00
Victor Zverovich
81fe170849 Update docs 2025-10-12 10:42:12 -07:00
Victor Zverovich
491dc16a6d Cleanup docs 2025-10-12 10:33:05 -07:00
Victor Zverovich
41326207c7 Cleanup docs 2025-10-12 10:20:16 -07:00
Victor Zverovich
c4f70ab69e Cleanup docs 2025-10-12 09:34:46 -07:00
Victor Zverovich
5e214f0c43 Cleanup docs 2025-10-12 09:24:58 -07:00
Victor Zverovich
1234bc312e Apply clang-tidy 2025-10-11 07:58:17 -07:00
rohitsutreja
b77a751625 Revert std::malloc/std::free to global malloc/free (#4569) (#4570) 2025-10-10 09:37:05 -07:00
rohitsutreja
8db24c0ea9 restore 'inline' for normalize_libcxx_inline_namespaces (#4571) 2025-10-10 07:49:53 -07:00
Fatih BAKIR
03c7e28965 write_demangled_name supports libc++ + clang-cl (#4560)
The current implementation assumes whenever we're on an FMT_MSC_VERSION
compiler, the standard library is MSVC's STL. However, with clang-cl we
have the possibility of using LLVM libc++ instead of MSVC STL. In that
scenario, the previous implementation produced the wrong demangled names
for RTTI types.

This patch detects the different combinations, and combines the existing
demangling implementations to produce the correct names and make all
tests pass on libc++ + clang-cl.
2025-10-08 12:23:57 -07:00
Victor Zverovich
47a18b2fe9 Minor cleanup 2025-10-07 13:52:59 -07:00
Peter Steneteg
eb44d87b52 docs: range formatter grammar fix (#4567) 2025-10-07 11:34:00 -07:00
Martin Valgur
b580360ab7 base.h: _BitInt is not available when Clang is used as a host compiler for NVCC (#4564) 2025-10-06 08:45:12 -07:00
Oleksandr Koval
486e7ba579 support std::optional holding cv-qualified types (#4562)
Fixes #4561
2025-10-03 04:40:44 -07:00
Victor Zverovich
27ea09836a Error on unsafe uses of join 2025-10-02 16:24:22 -04:00
Victor Zverovich
b5b9317a3c Warn about unsafe use of join 2025-10-02 12:35:07 -04:00
dependabot[bot]
d13e5d048d Bump github/codeql-action from 3.29.7 to 3.30.5 (#4558)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.7 to 3.30.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](51f77329af...3599b3baa1)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.30.5
  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>
2025-10-02 06:08:07 -07:00
teruyamato0731
b9ac8b225d style: Correct indentation in locale initialization (#4557) 2025-10-02 04:10:31 -07:00
teruyamato0731
4801f54e59 docs: Add compile-time options to API documentation (#4551) 2025-09-30 14:03:11 -07:00
Victor Zverovich
5f66e07cb0 Suppress an unused argument warning 2025-09-28 19:45:41 -04:00
Victor Zverovich
17be91c079 Fix a clang-tidy error 2025-09-26 08:28:51 -07:00
Victor Zverovich
dcea616535 Fix compilation with locale disabled in header-only mode 2025-09-26 07:48:43 -07:00
SnapperTT
a2fd48e039 Make FMT_USE_CONSTEVAL optional #4545 (#4546) 2025-09-24 11:00:41 -07:00
Nikita Tsarev
e28c371c0f Fix ambiguous call to fprintf when compiling as a C++20 module (#4548) 2025-09-22 11:58:59 -07:00