7835 Commits

Author SHA1 Message Date
st0rmbtw
4b50ad7944
Replace try and catch with the FMT_TRY and FMT_CATCH macros (#4751) 2026-04-20 10:29:42 -07:00
Powerbyte7
2cb3983213
Update link anchor (#4748) 2026-04-16 08:42:35 -07:00
Victor Zverovich
382609a920 Cleanup module test and CI config 2026-04-14 12:30:21 -07:00
Mathew Benson
8783c3c2d4
enable fmt_module tests by updating module-test.cc (#4702)
- Update g++ module testing to use g++ version 15 instead of 14.
  The module support in version 14 isn't very stable and the module
  testing was not working due to unresolved locale symbols.
- Update CI for linux and macos to add verbosity so its consistent with
  windows.
- Refactor test/CMakeLists.txt to enable testing for modules
- The tests in `module-test.cc` seem to not have been updated in some
  time despite changes in the main library.
- Wide String versions of several tests appear to be deprecated so have
  been removed.
- Refactored tests related to `fmt::format_args` that now requires lvalue
  references as opposed to direct values.
- Remove the none-working code identified in the `module-test.cc` file
  while updating.
2026-04-12 10:07:16 -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
Kağan Can Şit
9396f77fe4
Remove unused header includes in test files (#4729) 2026-04-05 18:40:48 -07:00
Victor Zverovich
d2a159fbe7 Apply clang-format 2026-04-03 17:35:28 -07:00
mccakit
3febdca556
clang compilation failiure fix (#4718) 2026-04-02 16:51:38 -07:00
Victor Zverovich
907f002f8e Cleanup CI 2026-04-02 16:30:52 -07:00
dependabot[bot]
579587bee3
Bump github/codeql-action from 4.32.0 to 4.35.1 (#4727)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.32.0 to 4.35.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](b20883b0cd...c10b8064de)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.35.1
  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-04-02 15:20:10 -07:00
Victor Zverovich
8572a24603 Cleanup CI config 2026-04-02 15:04:00 -07:00
Mathew Benson
cdb8dc76d9
Add C++-Modules Based Linux CI workflow (#4708)
- This adds a set of CI tests for linux that include compilers that
  support modules
- This CI workflow uses ninja as the build system generator
- Can be integrated with the other linux workflow after successful
  testing

Co-authored-by: Mathew Benson <mathew@benson.co.ke>
2026-03-28 09:45:56 -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 Zverovich
4968433a6a Minor cleanup 2026-03-16 14:34:20 -07:00
Victor Chernyakin
e8244777ee
Move a few classes into an anonymous namespace (#4713) 2026-03-15 07:33:33 -07:00
Victor Zverovich
879463ecad Apply cmake-format 2026-03-14 14:24:09 -07:00
Victor Zverovich
7733f4c136 Add cmake-format job 2026-03-14 13:51:29 -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 Chernyakin
245e4d9723
Clean up a couple of CMake includes (#4710)
CMakeParseArguments is a no-op since CMake 3.5 and the
minimum version {fmt} supports is 3.8:
    https://cmake.org/cmake/help/latest/module/CMakeParseArguments.html

GNUInstallDirs is already unconditionally included
earlier in the file.
2026-03-11 06:32:04 -07:00
Mathew Benson
2b4eb7df47
Update Check for module support to include compiler versions (#4709)
- We need to confirm compiler support for module scanning before
  creating the CXX_MODULE FILE_SET using the `target_sources` command
- This is especially relevant for compilers that have module support but
  do not support the module scanning such as g++13, clang15. For these
    we can use the older way of creating the fmt-module target

Co-authored-by: Mathew Benson <mathew@benson.co.ke>
2026-03-09 15:37:46 -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
ab4f661521 Rename cmake-format config 2026-03-05 17:36:49 -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
Victor Zverovich
282b68cbd7
Update a link 2026-03-04 09:09:09 -08:00
Yancey
8277ee6aa0
Update fmt::join to support more character types (#4686) 2026-03-04 08:14:08 -08:00
Ferdinand Bachmann
e2bf61cdf8
Fix fmt-c.h not being installed with fmt-c library (#4694)
Signed-off-by: Ferdinand Bachmann <ferdinand.bachmann@yrlf.at>
2026-03-03 16:43:53 -08:00
Victor Zverovich
e090e3ffad Apply cmake-format 2026-03-03 15:49:40 -08:00
Victor Zverovich
eef9ff4938 Fix module test 2026-03-03 12:53:45 -08:00
Victor Zverovich
04434416a4 Remove unnecessary CI change 2026-03-03 12:35:39 -08:00
Victor Zverovich
011b24123b Cleanup module test 2026-03-03 12:30:54 -08:00
Victor Zverovich
43d4810ba9 Cleanup CMake config more 2026-03-03 11:40:10 -08:00
Victor Zverovich
e3a149f23c Cleanup CMake config 2026-03-03 09:51:56 -08:00
Victor Zverovich
af9bb5c075 Mark detail::named_arg as deprecated 2026-03-03 08:22:10 -08:00
Victor Zverovich
0f133953fb Tweak docs 2026-03-03 08:20:51 -08:00
Mathew Benson
4e1b170b44
Add Separate CMake Target for C++20 Modules (#4685)
* Add Separate CMake Target for C++20 Modules

In the same vein as there is the `fmt::fmt-header-only`, `fmt::fmt` and
`fmt::fmt_c` targets, I propose the addition of a new target
`fmt::fmt-module` which will be for the compilation of the FMT_MODULE
library option.

The new target will have the properties requried for Compiling,
Installing and using the C++20 functionality in CMake

The `add_module_library` function is marked as deprecated as its
functionality is superseded.

Updated the logic for setting the FMT_USE_CMAKE_MODULE flag to check the
versions for Ninja and MSVC according the CMAKE Documents and setting
the FMT_MODULE flag based on this

* Add Separate CMake Target for C++20 Modules

In the same vein as there is the `fmt::fmt-header-only`, `fmt::fmt` and
`fmt::fmt_c` targets, I propose the addition of a new target
`fmt::fmt-module` which will be for the compilation of the FMT_MODULE
library option.

The new target will have the properties requried for Compiling,
Installing and using the C++20 functionality in CMake

Updated the logic for setting the FMT_USE_CMAKE_MODULE flag to check the
versions for Ninja and MSVC according the CMAKE Documents and setting
the FMT_MODULE flag based on this

Fixed the test/CMakeLists.txt file which used the FMT_MODULE flag to
separate the module and non-module library testing, in particular
disableing the module version.

The module testing still needs to be fixed, but the expected behavior of
testing the non-modular version is working.

---------

Co-authored-by: Mathew Benson <mathew@benson.co.ke>
Co-authored-by: ClausKlein <claus.klein@arcormail.de>
2026-03-02 09:11:31 -08:00
dependabot[bot]
fca0445565
Bump actions/upload-artifact from 6.0.0 to 7.0.0 (#4691)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6.0.0 to 7.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](b7c566a772...bbbca2ddaa)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-01 13:06:20 -08:00
TPPPP
db4bea83d6
Move named_arg to public API (#4687) 2026-02-28 15:34:39 -08:00
Victor Zverovich
88c5a91487
Fix CI (#4690) 2026-02-28 08:37:13 -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
dc97113ca1 Cleanup the C API 2026-02-21 17:15:19 -08:00