Vladislav Shchapov
73f2b344b2
Add std::complex formatter
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2024-03-17 15:26:18 -07:00
Vladislav Shchapov
9f3fc6e38b
Add XChar support into nested_formatter
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2024-03-17 15:26:18 -07:00
Victor Zverovich
e281749c5d
Simplify range formatter
2024-03-10 08:19:26 -07:00
Victor Zverovich
11f2f30f0b
Simplify range formatter
2024-03-09 08:23:12 -08:00
mtillmann0
13cfaa2ab0
Guard against usage of _isatty when header was not included ( #3880 )
...
* Guard against usage of _isatty when header was not included
* Rename FMT_WINDOWS_NO_WCHAR macro to FMT_USE_WRITE_CONSOLE
2024-03-08 13:34:46 -08:00
js324
0861db500f
Support character range formatting ( #3863 )
2024-03-07 10:51:46 -08:00
Victor Zverovich
3bc6cc1e63
Protect against locking formatters
2024-03-02 17:23:02 -08:00
Baardi
ae1e93d34d
Fix warning C4702 emitted from format.h (MSVC) ( #3866 )
2024-02-28 07:47:13 -08:00
Victor Zverovich
f68f452dea
Workaround an ld warning on macOS
2024-02-25 11:41:52 -08:00
Gao Mingfei
ebea5736a2
Fix chrono locale format bug for RHEL gcc ( #3859 )
2024-02-25 07:09:33 -08:00
Baardi
ddf0b7d2b5
Fix warning C4365 emitted from printf.h ( #3865 )
2024-02-23 16:33:21 -08:00
prlw1
0166f455f6
std.h c++23 build fix ( #3856 )
...
Add ::value to is_formattable<...> as per suggestion by @vitaut in
https://github.com/fmtlib/fmt/issues/3854
2024-02-19 10:19:39 -08:00
Victor Zverovich
8e42eef495
Don't error on min time_point
2024-02-10 17:50:42 -08:00
Victor Zverovich
44c3fe1ebb
Fix handling of static separator
2024-02-09 15:58:56 -08:00
Anders Dalvander
ae181cc93d
C++23 compatibility: basic_string_view cannot be constructed from nullptr ( #3846 )
...
Co-authored-by: Anders Dalvander <anders.dalvander@sartorius.com>
2024-02-09 07:39:43 -08:00
Bruce Mitchener
3a6fb2fcaf
Fix some typos. ( #3843 )
2024-02-08 10:59:52 -08:00
Bruce Mitchener
0879504796
Fix typo in typename. containter_type -> container_type. ( #3844 )
2024-02-08 06:24:55 -08:00
js324
34f415b56e
Fix %S formatting for chrono durations with leading zeroes ( #3814 )
2024-02-07 09:47:32 -08:00
Victor Zverovich
06311ed1ce
Fix fixed rounding around zero in Dragon
2024-02-03 10:13:58 -08:00
Dominic Pöschko
e5bab8dab4
added formatter for std::expected ( #3834 )
2024-02-03 09:06:15 -08:00
Victor Zverovich
6321a97d6b
Simplify color formatting
2024-01-31 18:30:23 -08:00
Victor Zverovich
4b6b32f388
Deprecate wide stream function
2024-01-31 18:10:52 -08:00
Afanasyev Ivan
1b54ba4b9d
Fix UB in format_arg_store implementation. ( #3833 )
2024-01-31 10:08:29 -08:00
Frank Richter
71a4a8d479
Really fix MSVC warning about <bit> only being available in C++20. ( #3832 )
...
* Really fix MSVC warning about <bit> only being available in C++20.
The warning states "The contents of <bit> are available only with C++20 or later.",
but the check was for C++17 and later.
* Change <bit> inclusion check per https://github.com/fmtlib/fmt/pull/3832#discussion_r1471144867
2024-01-30 10:42:35 -08:00
Victor Zverovich
8e62172ab6
Fix a warning
2024-01-29 07:48:48 -08:00
Victor Zverovich
28afff363c
Improve buffering
2024-01-27 16:20:34 -08:00
Victor Zverovich
af44c29744
Separate buffer initialization from flush
2024-01-27 15:39:36 -08:00
Victor Zverovich
a1e1eedbb5
Minor cleanup
2024-01-27 14:00:13 -08:00
Victor Zverovich
ffce3632b7
Add glibc stream support
2024-01-27 11:00:45 -08:00
Victor Zverovich
6435b169ec
Add support for line buffering
2024-01-27 08:57:21 -08:00
Beat Bolli
e1832bcf00
Consider ADL begin() and end() when joining ranges ( #3824 )
...
Closes #3813
Signed-off-by: Beat Bolli <dev@drbeat.li>
2024-01-22 07:39:33 -08:00
Edoardo Lolletti
06fc25f266
Don't always enable typeid usage under msvc ( #3821 )
2024-01-21 06:28:22 -08:00
Victor Zverovich
11ba1270ab
Fix flush
2024-01-20 07:58:56 -08:00
Victor Zverovich
4c5b4af04d
Improve name argument validation
2024-01-19 16:13:43 -08:00
Victor Zverovich
6b68dff901
Write directly to a stream buffer
2024-01-18 16:27:12 -08:00
Victor Zverovich
b2cde48de5
Reduce usage of float_specs
2024-01-17 08:27:03 -08:00
Victor Zverovich
8510838db1
Make format_specs not depend on code unit type
2024-01-17 07:50:52 -08:00
Victor Zverovich
090ee13595
Pass char type to write
2024-01-17 06:07:29 -08:00
Vladislav Shchapov
470c4e6ca8
Fix scope for glibc ext for sec, min, and hour ( #3812 )
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2024-01-16 13:54:19 -08:00
The Phantom Derpstorm
13ec66bf78
🛠 Add basic array safety functions and backwards-compatible result type ( #3805 )
2024-01-16 07:01:15 -08:00
Victor Zverovich
64091b7a25
Fix naming
2024-01-15 15:17:46 -08:00
Victor Zverovich
e954823531
Make fill independent on code unit type
2024-01-15 15:00:28 -08:00
Victor Zverovich
83652dfee7
Restrict always inlining to the top-level API
2024-01-15 10:09:01 -08:00
Bruce Mitchener
73d91351b4
Mark iterator_buffer move constructors as noexcept. ( #3808 )
2024-01-15 08:46:35 -08:00
Victor Zverovich
fe0d910a7d
Replace multiple error reporting mechanisms with report_error
2024-01-15 07:23:06 -08:00
Victor Zverovich
f9294f0e60
Improve handling of format specs
2024-01-15 06:31:24 -08:00
Victor Zverovich
c98a5a599f
Remove unnecessary checks
2024-01-14 17:41:49 -08:00
Victor Zverovich
d70729215f
Fix constness
2024-01-14 06:44:38 -08:00
Victor Zverovich
56fa4d61f6
Fix docs
2024-01-13 19:03:23 -08:00
Victor Zverovich
cacdf1439f
Remove nonstandard alias
2024-01-13 15:56:16 -08:00
Victor Zverovich
4d766b1670
Invert dependencies
2024-01-13 10:30:44 -08:00
Victor Zverovich
c10859f15c
Remove deprecated options
2024-01-13 10:25:11 -08:00
Victor Zverovich
d0963d4823
Make ranges only depend on fmt/base.h
2024-01-13 09:54:19 -08:00
Victor Zverovich
da0f84c42c
Cleanup copy functions and move to base.h
2024-01-13 09:31:20 -08:00
Victor Zverovich
59baac522e
Remove unused functions
2024-01-13 09:03:35 -08:00
Vladislav Shchapov
21b0458291
Use std::allocator_traits ( #3804 )
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2024-01-13 08:48:37 -08:00
Vladislav Shchapov
df6a3564b0
Fix MSVC warning: "The contents of <bit> are available only with C++20 or later." ( #3807 )
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2024-01-13 08:26:44 -08:00
Hans-Martin B. Jensen
7c163acfda
Fix conversion warning in filesystem::path formatter ( #3806 )
...
* Fix conversion warning in filesystem::path formatter
Use template character type to eliminate MSVC conversion warning when
formatting a wide chararacter path:
fmt\std.h(140,49): warning C4244: '=': conversion from 'const Char' to 'char', possible loss of data
* Review: use to_ascii instead
---------
Co-authored-by: Hans-Martin B. Jensen <haje@eposaudio.com>
2024-01-13 08:02:31 -08:00
Victor Zverovich
297b22f585
Remove <memory> dependency
2024-01-12 09:09:19 -08:00
Victor Zverovich
3c9608416a
Remove redundant detection of experimental string_view
2024-01-12 07:45:07 -08:00
Victor Zverovich
0cdee904a4
Add a missing num_bits specialization
2024-01-12 07:20:12 -08:00
Victor Zverovich
7e58af4eaf
Fix an ICE on clang <= 15
2024-01-12 06:48:03 -08:00
Victor Zverovich
f1924d3269
Cleanup macros
2024-01-12 06:35:25 -08:00
Victor Zverovich
52174953bc
Cleanup conseval detection
2024-01-12 05:59:22 -08:00
Victor Zverovich
b71d98774b
Reduce usage of FMT_COSTEXPR20
2024-01-11 21:27:00 -08:00
Victor Zverovich
810d1750f1
Cleanup constexpr detection
2024-01-11 21:08:01 -08:00
Victor Zverovich
170ffb1ff8
Simplify constexpr checks
2024-01-11 20:26:52 -08:00
Victor Zverovich
e470ba8b7b
Simplify exception detection
2024-01-11 19:42:06 -08:00
Victor Zverovich
bf98e3e4c6
Cleanup macros
2024-01-11 19:16:35 -08:00
Victor Zverovich
fd87a23d34
Reduce memory dependency
2024-01-10 20:00:15 -08:00
Victor Zverovich
b71ef65b6e
Remove iterator dependency
2024-01-10 18:52:53 -08:00
Victor Zverovich
c5340539f9
Remove unnecessary trait specialization
2024-01-10 18:11:37 -08:00
Victor Zverovich
971f7ae768
Minor cleanup
2024-01-10 16:43:00 -08:00
Victor Zverovich
da7a232b9e
Cleanup contexts
2024-01-10 13:09:55 -08:00
Tristan Brindle
2595bf57b3
Fix formatting of ranges with begin()&/end()&
...
C++20 allows ranges to have lvalue-qualified begin() and end() member functions. fmt correctly handles this if begin() and end() are additionally const-qualifed (i.e. begin() const&), but not in the non-const case. For example:
https://godbolt.org/z/YfxaYz5r7
This patch fixes fmt's range detection to handle this case by testing calls to detail::ranges_begin()/end() with an lvalue T&, matching the behaviour in the const case.
2024-01-10 12:22:53 -08:00
Vladislav Shchapov
6f5d53ce08
Add fmt::is_contiguous<std::basic_string<Char, Traits, Allocator>>
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2024-01-10 10:47:39 -08:00
Vladislav Shchapov
961df829b9
Fix buffer overflow if output iterator is std::back_insert_iterator and value is escaped (debug format)
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2024-01-10 09:15:16 -08:00
Victor Zverovich
401f087394
Fix write_uintptr_fallback
2024-01-10 09:09:57 -08:00
Victor Zverovich
3d84b45a22
Update core.h
2024-01-10 06:57:22 -08:00
Victor Zverovich
4331abed26
Move fmt::format to fmt/format.h
2024-01-10 06:43:12 -08:00
Victor Zverovich
fc8f6ba934
Separate compilation for println
2024-01-10 05:55:26 -08:00
Victor Zverovich
58a6bd48a8
Add core.h for compatibility
2024-01-09 20:10:30 -08:00
Victor Zverovich
79f1506fe3
Add base.h
2024-01-09 19:36:12 -08:00
Victor Zverovich
4d616479b5
Simplify make_format_args
2024-01-09 19:18:35 -08:00
Victor Zverovich
7ba6420540
Optimize debug codegen
2024-01-09 11:44:57 -08:00
Victor Zverovich
f7ed65fa4a
Simplify format_arg_store
2024-01-09 06:29:16 -08:00
Victor Zverovich
f34f31b321
Move format_arg_store to detail
2024-01-08 21:44:56 -08:00
Victor Zverovich
fb66131efa
Improve arg storage
2024-01-08 21:25:41 -08:00
Victor Zverovich
6af30d8f75
Remove legacy workaround
2024-01-08 20:13:50 -08:00
Victor Zverovich
c177324ba9
Simplify basic_format_args
2024-01-08 18:42:53 -08:00
Victor Zverovich
545d37a8b0
Remove extra level of indirection when building args
2024-01-08 17:58:07 -08:00
Victor Zverovich
a5ae9ae19d
Split standard context into a separate class and optimize
2024-01-08 07:08:49 -08:00
Victor Zverovich
23e8109d8d
Remove buffer_appender
2024-01-07 22:03:02 -08:00
Victor Zverovich
679af1f5cc
Remove redundant get_container
2024-01-07 19:31:26 -08:00
Victor Zverovich
48d7fb265b
Merge back_insert_iterator and appender
2024-01-07 18:43:27 -08:00
Victor Zverovich
f348d1a211
Reintroduce back_insert_iterator detection
2024-01-07 17:44:40 -08:00
Victor Zverovich
df67df7b4c
Add is_back_insert_iterator
2024-01-07 16:44:42 -08:00
Victor Zverovich
17f79ac6cf
Minor cleanup
2024-01-07 15:04:38 -08:00
Victor Zverovich
dbdfc99fa1
Don't crash if flush fails during unwinding
2024-01-07 14:55:16 -08:00
Victor Zverovich
c1d9e88402
Remove unnecessary final and apply clang-format
2024-01-07 13:08:17 -08:00
Victor Zverovich
7d73ef85f7
Cleanup ranges
2024-01-06 19:37:14 -08:00
Victor Zverovich
ae9b0b521b
Disable transitive includes
2024-01-06 15:22:13 -08:00
Victor Zverovich
1b7d9db0ce
Remove string dependency
2024-01-06 06:25:34 -08:00
Victor Zverovich
0641b844ac
Cleanup string traits
2024-01-05 19:31:04 -08:00
Victor Zverovich
1e938dda20
Simplify char_t
2024-01-05 15:32:59 -08:00
Victor Zverovich
2e5b14bf60
Add compile-time checks to color formatting
2024-01-05 09:51:52 -08:00
Victor Zverovich
e0b604beb1
Remove a redundant function
2024-01-04 15:59:33 -08:00
Victor Zverovich
bee495c97f
Remove dead code
2024-01-04 09:40:30 -08:00
Victor Zverovich
794e1b6145
Remove redundant overload
2024-01-04 09:21:19 -08:00
Victor Zverovich
c7061776ab
Bump version
2024-01-04 05:50:54 -08:00
Victor Zverovich
dc52d176de
Cleanup dependencies
2024-01-03 20:52:45 -08:00
Victor Zverovich
0e3e61cc0a
Remove limits dependency
2024-01-03 19:14:30 -08:00
Victor Zverovich
800a0bb23f
Remove dependency on string_view
2024-01-03 18:49:45 -08:00
Victor Zverovich
f2e43f967c
Remove char_traits dependency
2024-01-03 13:16:28 -08:00
Victor Zverovich
c9287eb9f7
Reduce char_traits usage
2024-01-03 10:02:16 -08:00
Victor Zverovich
61f144bd61
Move copy_str for format.h
2024-01-03 09:05:09 -08:00
Victor Zverovich
4687f8e37e
Remove dependency on <iterator>
2024-01-03 08:20:04 -08:00
Victor Zverovich
f2c55f6bb8
Remove dependency on back_insert_iterator
2024-01-03 06:16:00 -08:00
Victor Zverovich
c9d233c0a4
Decouple appender from back_insert_iterator
2024-01-03 06:16:00 -08:00
Victor Zverovich
4e43a46993
Clarify why we can't have nice things
2024-01-02 19:14:32 -08:00
Victor Zverovich
c36ed77ff0
Get rid of addressof
2024-01-02 18:44:27 -08:00
Victor Zverovich
e2ab9ab22b
Add FMT_GLIBCXX_RELEASE
2024-01-02 16:15:23 -08:00
Victor Zverovich
0378d171f9
Replace remove_cvref_t with remove_const_t
2024-01-02 12:46:09 -08:00
Victor Zverovich
63ce170853
Replace virtual dispatch with normal functions in buffers
2024-01-02 07:02:20 -08:00
Victor Zverovich
74ffea0dcf
Simplify to_ascii
2024-01-01 20:09:47 -08:00
Victor Zverovich
4ec9c2906b
Apply coding conventions
2024-01-01 19:04:25 -08:00
Victor Zverovich
f4a7d40dca
Dedup throw_format_error
2024-01-01 18:42:23 -08:00
Victor Zverovich
068bf9bad8
Make visitation compatible with std::format
2024-01-01 17:31:36 -08:00
Victor Zverovich
50565f9853
Move misplaced join overloads to fmt/ranges.h
2024-01-01 16:28:59 -08:00
Victor Zverovich
0b39d67103
Remove detail::error_handler
2024-01-01 16:10:13 -08:00
Victor Zverovich
c142385033
Improve the pipe API
2024-01-01 15:55:37 -08:00
Victor Zverovich
b0569451a7
Bump version
2024-01-01 10:06:52 -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
a5bacf3fef
Remove custom_formatter
2023-12-31 12:34:18 -08:00
Victor Zverovich
e33c1568c3
Implement scan argument access
2023-12-31 08:49:29 -08:00
Victor Zverovich
23826669cf
Cleanup error handling
2023-12-31 07:51:57 -08:00
Victor Zverovich
8c520b4fdc
Fix comment
2023-12-29 15:48:25 -08:00
Victor Zverovich
47a0eec2e8
Remove unnecessary alias
2023-12-29 09:59:55 -08:00
Victor Zverovich
d5823aae36
Ceci n'est pas une pipe
2023-12-29 08:11:29 -08:00
Victor Zverovich
47c8f63d02
Remove redundant specifier
2023-12-28 07:32:07 -08:00
Victor Zverovich
df62c86783
Mark grow as deprecated
2023-12-25 10:11:22 -08:00
Victor Zverovich
fc0f84d290
Move formatbuf to ostream.h
2023-12-23 15:00:28 -08:00
Victor Zverovich
86f2ec5de7
Fix a warning
2023-12-23 14:51:43 -08:00
Victor Zverovich
a537c39fdf
Move conjunction to where it is used
2023-12-23 14:35:11 -08:00
Victor Zverovich
7c240d52c3
Remove unused symbol
2023-12-23 13:20:55 -08:00
Victor Zverovich
e7875ae0fa
Fix formatting of some nested ranges
2023-12-23 09:35:32 -08:00
Victor Zverovich
3eb3aef575
Fix handling of set_debug_format
2023-12-23 08:32:36 -08:00
Vladislav Shchapov
9cd2b87e18
Fix wchar_t to char conversion warnings ( #3764 )
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2023-12-20 08:59:26 -08:00
Victor Zverovich
d5da9cc40e
Apply clang-tidy
2023-12-19 17:52:50 -08:00
Vladislav Shchapov
9165434e5a
Enable consteval in MSVC VS2019 version 16.10 ( #3757 )
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2023-12-18 13:00:11 -08:00