87 Commits

Author SHA1 Message Date
Victor Zverovich
080b1d0219 Avoid a path string copy and move wide path tests to xchar-test
FMT_STATIC_THOUSANDS_SEPARATOR has had no effect since 11.1.0, so drop
its guard.
2026-11-07 07:27:07 -08:00
Victor Zverovich
b1397ab7bc Fix valueless variant output and simplify literals in std.h
The catch block dropped the iterator returned by write, so the text
was lost when formatting into a pointer with FMT_COMPILE.
2026-11-06 11:35:06 -08:00
Marvel Harisson
7f7a16a131
Fix wide formatting of variant, monostate and expected (#4991)
The formatters for std::variant, std::monostate, std::expected and
std::unexpected wrote narrow string literals with detail::write<Char>,
which is ambiguous for wchar_t, so formatting these types into a wide
string failed to compile even though is_formattable reported them as
formattable. Use detail::string_literal like the std::optional
formatter does.
2026-11-06 09:57:48 -08:00
Marvel Harisson
88a0ae2020
Use the locale decimal point in localized hexfloat formatting (#4992)
With the L flag, floating-point values are formatted with the locale's
decimal point, but the hexfloat presentation ('a'/'A') always emitted
'.'. Replace it with the locale decimal point when the value is
localized, like the other floating-point presentations do.
2026-10-24 11:15:30 -07:00
James Panayis
9197f51593
Optimize buffered padding with chunked fills (#4959)
Fill available appender storage in bulk, continuing across buffer growth and flushes
Preserve the constexpr-compatible scalar fallback
Add testing of large padded sizes
2026-10-02 11:44:42 -07:00
Victor Zverovich
46cf422f54 Unify copyright notices 2026-05-31 08:54:06 -07:00
Kağan Can Şit
9396f77fe4
Remove unused header includes in test files (#4729) 2026-04-05 18:40:48 -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
d38881410a Deprecated initializer_list join 2026-03-05 16:42:07 -08:00
Yancey
8277ee6aa0
Update fmt::join to support more character types (#4686) 2026-03-04 08:14:08 -08:00
Victor Zverovich
45f230b9b2 Remove const_check 2026-01-29 20:18:18 -08:00
Victor Zverovich
489fd7ca4b Simplify locale handling 2025-08-31 09:33:43 -07:00
Victor Zverovich
e7e71009c7 Make FP formatting compatible with exotic chars 2025-08-24 08:49:54 -07:00
Vladislav Shchapov
571c02d475
Add xchar support for std::byte formatter (#4480)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2025-06-23 14:02:11 -07:00
Victor Zverovich
da776c9a66 Test timezone 2025-04-12 07:53:58 -07:00
Vladislav Shchapov
dad3237514 Fix a bug when copying the fill from basic_specs
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2025-01-03 09:16:21 -08:00
Vladislav Shchapov
880e1494dc Improve xchar support for std::bitset formatter
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2025-01-03 09:16:21 -08:00
Victor Zverovich
601be1cbe7 Add support for code units > 0xFFFF in fill 2024-10-19 08:15:50 -07:00
Victor Zverovich
1bde49e545 Remove FMT_USE_USER_LITERALS 2024-09-11 11:27:27 -07:00
Victor Zverovich
6c90b31fbd Improve debug codegen 2024-09-08 07:49:02 -07:00
Victor Zverovich
f5a16a484b Cleanup 2024-09-06 12:41:53 -07:00
Victor Zverovich
79e5ae919c Fix locale tests on FreeBSD 2024-09-03 12:50:03 -07:00
Victor Zverovich
377cf203e3 Add opt out for built-in types 2024-08-29 11:21:29 -07:00
Victor Zverovich
0b5287f8b7 Remove unused function 2024-05-15 16:47:35 -07:00
Hans-Martin B. Jensen
ee0c3351a4
Fix format_to + FMT_STRING for wide character type (#3931)
Added overload that takes a wformat_string.
Fixes issue #3925.
2024-04-17 08:30:48 -07:00
Victor Zverovich
c0dac83982 Use p2197 format for complex by default 2024-03-19 07:55:45 +09:00
Vladislav Shchapov
73f2b344b2 Add std::complex formatter
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2024-03-17 15:26:18 -07:00
Bruce Mitchener
3a6fb2fcaf
Fix some typos. (#3843) 2024-02-08 10:59:52 -08:00
Victor Zverovich
f9294f0e60 Improve handling of format specs 2024-01-15 06:31:24 -08:00
Victor Zverovich
d70729215f Fix constness 2024-01-14 06:44:38 -08:00
Victor Zverovich
fb66131efa Improve arg storage 2024-01-08 21:25:41 -08:00
Victor Zverovich
0641b844ac Cleanup string traits 2024-01-05 19:31:04 -08:00
Bruce Mitchener
ebd5c8f994
Consistently use fmt:: when invoking format_to. (#3779)
This has been done partially in previous commits:

* 2ac6c5ca8b3dfbcb1cc5cf49a8cc121e3984559c
* 258000064d71a7d228d608a2e3d43bde3e32a658
* ba50c19e827383bd5dacb74189fb4852c8dcbdae
* 5ab9d39253b8bcb85a475dc058955b3916f3410a

A patch that includes the `std::error_code` changes here is
upstream in vcpkg, so that will be able to be removed when
updating to the next release.
2024-01-01 06:57:03 -08:00
Victor Zverovich
23826669cf Cleanup error handling 2023-12-31 07:51:57 -08:00
Victor Zverovich
c4283ec471 Fix a libc++ warning and move the test to the right place 2023-11-25 08:20:53 -08:00
Victor Zverovich
130cf54cbc Use a more sensible locale in tests 2023-10-08 10:49:21 -07:00
Vladislav Shchapov
492a99c964
Fix error: 'char_traits<custom_char>' is deprecated: char_traits<T> for T not equal to char, wchar_t, char8_t, char16_t or char32_t is non-standard and is provided for a temporary period. It will be removed in LLVM 18, so please migrate off of it. [-Werror,-Wdeprecated-declarations] (#3634)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2023-09-18 15:46:17 -07:00
Nico Rieck
171a020c82
Pass correct Char to base format_as formatter (#3457) 2023-05-24 14:50:47 -07:00
Victor Zverovich
ea49c91cd1 Cleanup argument construction 2023-05-11 18:43:39 -07:00
Victor Zverovich
ebfb2e6779 Remove unused alias 2023-05-11 10:51:32 -07:00
Victor Zverovich
5780269d57 Improve API safety 2023-05-11 10:19:56 -07:00
Victor Zverovich
02bf4d1c1c Disable to_string_view ADL 2023-04-09 08:49:05 -07:00
tom-huntington
5b8302079d
Add optional support (#3303) 2023-02-25 06:45:56 -08:00
Shawn Zhong
87c066a35b
Implement println (#3267) 2023-01-24 12:30:00 -08:00
Shawn Zhong
39971eb336
Fix localized format for float-point numbers (#3272) 2023-01-15 11:47:24 -08:00
Victor Zverovich
a73a9b6a84 Refactor format string checks 2022-12-30 16:03:41 -08:00
Victor Zverovich
8fe4d97d5e Reduce template instantiations 2022-12-30 08:44:23 -08:00
Victor Zverovich
bd12aaa98e Simplify format string parsing 2022-12-25 12:31:38 -08:00
Vladislav Shchapov
4841784e82 Simplify C99 strftime detection conditions
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-12-25 10:16:19 -08:00
Vladislav Shchapov
cb72c23e9e Improve timezone tests
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-12-25 10:16:19 -08:00