Commit Graph
3337 Commits
Author SHA1 Message Date
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 b95fd6132b Avoid an ABI break for clang 2025-10-25 07:17:41 -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 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 DenholmandHarry 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
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 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
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
teruyamato0731 b9ac8b225d style: Correct indentation in locale initialization (#4557) 2025-10-02 04:10:31 -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
Victor Zverovich 6b6cdd9405 Store size in a local variable while unchanged 2025-09-21 12:51:06 -07:00
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