mirror of
https://github.com/fmtlib/fmt.git
synced 2025-12-07 01:06:53 +08:00
Merge branch 'fmtlib:master' into master
This commit is contained in:
commit
6a1e83c8d7
74
ChangeLog.md
74
ChangeLog.md
@ -1,3 +1,77 @@
|
|||||||
|
# 12.1.0 - TBD
|
||||||
|
|
||||||
|
- Optimized `buffer::append`, resulting in up to ~16% improvement on spdlog
|
||||||
|
benchmarks (https://github.com/fmtlib/fmt/pull/4541). Thanks @fyrsta7.
|
||||||
|
|
||||||
|
- Worked around an ABI incompatibility in `std::locale_ref` between clang and
|
||||||
|
gcc (https://github.com/fmtlib/fmt/issues/4573).
|
||||||
|
|
||||||
|
- Made `std::variant` and `std::expected` formatters work with `format_as`
|
||||||
|
(https://github.com/fmtlib/fmt/issues/4574,
|
||||||
|
https://github.com/fmtlib/fmt/pull/4575). Thanks @phprus.
|
||||||
|
|
||||||
|
- Made `fmt::join<string_view>` work with C++ modules
|
||||||
|
(https://github.com/fmtlib/fmt/issues/4379,
|
||||||
|
https://github.com/fmtlib/fmt/pull/4577). Thanks @Arghnews.
|
||||||
|
|
||||||
|
- Exported `fmt::is_compiled_string` and `operator""_cf` from the module
|
||||||
|
(https://github.com/fmtlib/fmt/pull/4544). Thanks @CrackedMatter.
|
||||||
|
|
||||||
|
- Fixed a compatibility issue with C++ modules in clang
|
||||||
|
(https://github.com/fmtlib/fmt/pull/4548). Thanks @tsarn.
|
||||||
|
|
||||||
|
- Added support for cv-qualified types to the `std::optional` formatter
|
||||||
|
(https://github.com/fmtlib/fmt/issues/4561,
|
||||||
|
https://github.com/fmtlib/fmt/pull/4562). Thanks @OleksandrKvl.
|
||||||
|
|
||||||
|
- Added demangling support (used in exception and `std::type_info` formatters)
|
||||||
|
for libc++ and clang-cl
|
||||||
|
(https://github.com/fmtlib/fmt/issues/4542,
|
||||||
|
https://github.com/fmtlib/fmt/pull/4560,
|
||||||
|
https://github.com/fmtlib/fmt/issues/4568,
|
||||||
|
https://github.com/fmtlib/fmt/pull/4571).
|
||||||
|
Thanks @FatihBAKIR and @rohitsutreja.
|
||||||
|
|
||||||
|
- Switched to global `malloc`/`free` to enable allocator customization
|
||||||
|
(https://github.com/fmtlib/fmt/issues/4569,
|
||||||
|
https://github.com/fmtlib/fmt/pull/4570). Thanks @rohitsutreja.
|
||||||
|
|
||||||
|
- Made the `FMT_USE_CONSTEVAL` macro configurable by users
|
||||||
|
(https://github.com/fmtlib/fmt/pull/4546). Thanks @SnapperTT.
|
||||||
|
|
||||||
|
- Fixed compilation with locales disabled in the header-only mode
|
||||||
|
(https://github.com/fmtlib/fmt/issues/4550).
|
||||||
|
|
||||||
|
- Fixed compilation with clang 21 and `-std=c++20`
|
||||||
|
(https://github.com/fmtlib/fmt/issues/4552).
|
||||||
|
|
||||||
|
- Fixed a dynamic linking issue with clang-cl
|
||||||
|
(https://github.com/fmtlib/fmt/issues/4576,
|
||||||
|
https://github.com/fmtlib/fmt/pull/4584). Thanks @FatihBAKIR.
|
||||||
|
|
||||||
|
- Fixed a warning suppression leakage on gcc
|
||||||
|
(https://github.com/fmtlib/fmt/pull/4588). Thanks @ZedThree.
|
||||||
|
|
||||||
|
- Made more internal color APIs `constexpr`
|
||||||
|
(https://github.com/fmtlib/fmt/pull/4581). Thanks @ishani.
|
||||||
|
|
||||||
|
- Fixed compatibility with clang as a host compiler for NVCC
|
||||||
|
(https://github.com/fmtlib/fmt/pull/4564). Thanks @valgur.
|
||||||
|
|
||||||
|
- Fixed various warnings and lint issues
|
||||||
|
(https://github.com/fmtlib/fmt/issues/4565,
|
||||||
|
https://github.com/fmtlib/fmt/pull/4572,
|
||||||
|
https://github.com/fmtlib/fmt/pull/4557).
|
||||||
|
Thanks @LiangHuDream and @teruyamato0731.
|
||||||
|
|
||||||
|
- Improved documentation
|
||||||
|
(https://github.com/fmtlib/fmt/issues/4549,
|
||||||
|
https://github.com/fmtlib/fmt/pull/4551,
|
||||||
|
https://github.com/fmtlib/fmt/issues/4566,
|
||||||
|
https://github.com/fmtlib/fmt/pull/4567,
|
||||||
|
https://github.com/fmtlib/fmt/pull/4578,).
|
||||||
|
Thanks @teruyamato0731, @petersteneteg and @zimmerman-dev.
|
||||||
|
|
||||||
# 12.0.0 - 2025-09-17
|
# 12.0.0 - 2025-09-17
|
||||||
|
|
||||||
- Optimized the default floating point formatting
|
- Optimized the default floating point formatting
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// The fmt library version in the form major * 10000 + minor * 100 + patch.
|
// The fmt library version in the form major * 10000 + minor * 100 + patch.
|
||||||
#define FMT_VERSION 120000
|
#define FMT_VERSION 120100
|
||||||
|
|
||||||
// Detect compiler versions.
|
// Detect compiler versions.
|
||||||
#if defined(__clang__) && !defined(__ibmxl__)
|
#if defined(__clang__) && !defined(__ibmxl__)
|
||||||
@ -236,6 +236,7 @@ FMT_PRAGMA_GCC(optimize("Og"))
|
|||||||
# define FMT_GCC_OPTIMIZED
|
# define FMT_GCC_OPTIMIZED
|
||||||
#endif
|
#endif
|
||||||
FMT_PRAGMA_CLANG(diagnostic push)
|
FMT_PRAGMA_CLANG(diagnostic push)
|
||||||
|
FMT_PRAGMA_GCC(diagnostic push)
|
||||||
|
|
||||||
#ifdef FMT_ALWAYS_INLINE
|
#ifdef FMT_ALWAYS_INLINE
|
||||||
// Use the provided definition.
|
// Use the provided definition.
|
||||||
@ -923,7 +924,7 @@ class locale_ref {
|
|||||||
public:
|
public:
|
||||||
constexpr locale_ref() : locale_(nullptr) {}
|
constexpr locale_ref() : locale_(nullptr) {}
|
||||||
|
|
||||||
template <typename Locale, int = (Locale::collate, 0)>
|
template <typename Locale, FMT_ENABLE_IF(sizeof(Locale::collate) != 0)>
|
||||||
locale_ref(const Locale& loc) : locale_(&loc) {
|
locale_ref(const Locale& loc) : locale_(&loc) {
|
||||||
// Check if std::isalpha is found via ADL to reduce the chance of misuse.
|
// Check if std::isalpha is found via ADL to reduce the chance of misuse.
|
||||||
isalpha('x', loc);
|
isalpha('x', loc);
|
||||||
@ -2997,6 +2998,7 @@ FMT_INLINE void println(format_string<T...> fmt, T&&... args) {
|
|||||||
return fmt::println(stdout, fmt, static_cast<T&&>(args)...);
|
return fmt::println(stdout, fmt, static_cast<T&&>(args)...);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FMT_PRAGMA_GCC(diagnostic pop)
|
||||||
FMT_PRAGMA_CLANG(diagnostic pop)
|
FMT_PRAGMA_CLANG(diagnostic pop)
|
||||||
FMT_PRAGMA_GCC(pop_options)
|
FMT_PRAGMA_GCC(pop_options)
|
||||||
FMT_END_EXPORT
|
FMT_END_EXPORT
|
||||||
|
|||||||
@ -136,10 +136,9 @@ FMT_API std::system_error vwindows_error(int error_code, string_view fmt,
|
|||||||
* **Example**:
|
* **Example**:
|
||||||
*
|
*
|
||||||
* // This throws a system_error with the description
|
* // This throws a system_error with the description
|
||||||
* // cannot open file 'madeup': The system cannot find the file
|
* // cannot open file 'foo': The system cannot find the file specified.
|
||||||
* specified.
|
* // or similar (system message may vary) if the file doesn't exist.
|
||||||
* // or similar (system message may vary).
|
* const char *filename = "foo";
|
||||||
* const char *filename = "madeup";
|
|
||||||
* LPOFSTRUCT of = LPOFSTRUCT();
|
* LPOFSTRUCT of = LPOFSTRUCT();
|
||||||
* HFILE file = OpenFile(filename, &of, OF_READ);
|
* HFILE file = OpenFile(filename, &of, OF_READ);
|
||||||
* if (file == HFILE_ERROR) {
|
* if (file == HFILE_ERROR) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user