Victor Zverovich
a5deb96bf5
Update gcc version
2024-09-10 20:52:35 -07:00
Victor Zverovich
61a241f03f
Cleanup
2024-09-10 20:24:57 -07:00
Victor Zverovich
ff82d8d2b5
Cleanup visit
2024-09-10 20:09:44 -07:00
Victor Zverovich
0cc20f5639
Remove iterator_t
2024-09-10 19:51:57 -07:00
Victor Zverovich
2ba6785d8f
Remove unused type
2024-09-10 19:00:08 -07:00
Victor Zverovich
5644e7507c
Remove unnecessary forwarding
2024-09-10 18:35:32 -07:00
Victor Zverovich
5345cfe6b3
Adjust clang-format
2024-09-10 18:24:35 -07:00
Victor Zverovich
3e9fdb3a1f
Cleanup
2024-09-10 17:27:49 -07:00
Victor Zverovich
3ada4aed20
Optionally exclude Unicode data
2024-09-08 16:52:01 -07:00
Victor Zverovich
b37be85bf1
Optionally disable named arguments
2024-09-08 16:25:33 -07:00
Victor Zverovich
70643b2511
Don't use format_error if exceptions disabled
2024-09-08 15:56:36 -07:00
Victor Zverovich
967e2d177d
Cleanup
2024-09-08 15:43:11 -07:00
Victor Zverovich
02c5d637c5
Cleanup
2024-09-08 11:13:44 -07:00
Victor Zverovich
047bf75c24
Cleanup
2024-09-08 10:00:25 -07:00
Victor Zverovich
2d3ba32e79
Improve debug codegen
2024-09-08 09:17:59 -07:00
Victor Zverovich
6c90b31fbd
Improve debug codegen
2024-09-08 07:49:02 -07:00
Victor Zverovich
9408c2ae8c
Readd support for FMT_BUILTIN_TYPES
2024-09-07 08:12:03 -07:00
Victor Zverovich
cc3ff1529d
Cleanup
2024-09-06 17:05:48 -07:00
Victor Zverovich
158893b384
Cleanup
2024-09-06 13:39:03 -07:00
Victor Zverovich
f5a16a484b
Cleanup
2024-09-06 12:41:53 -07:00
Victor Zverovich
cad876be4c
Switch to vargs
2024-09-06 12:12:39 -07:00
Victor Zverovich
debf6f8285
Switch to vargs
2024-09-06 09:10:39 -07:00
Victor Zverovich
35f4fab4c4
Simplify value ctor
2024-09-06 08:59:43 -07:00
Victor Zverovich
ff8f324786
Minor cleanup
2024-09-06 08:47:24 -07:00
Victor Zverovich
bd48715d81
Simplify make_format_args
2024-09-06 08:15:33 -07:00
Victor Zverovich
57d6df62f7
Simplify make_format_args
2024-09-06 08:07:22 -07:00
Victor Zverovich
8ed4a9dcc1
Improve debug codegen
2024-09-06 07:51:22 -07:00
Victor Zverovich
f288f45e46
Prepare for arg_store unification
2024-09-05 19:17:18 -07:00
Victor Zverovich
f1e3016c13
Optimize debug codegen
2024-09-04 17:10:52 -07:00
Victor Zverovich
106dc8fd64
Reduce usage of type_identity
2024-09-04 16:23:51 -07:00
Victor Zverovich
c3344e21e2
Cleanup base API
2024-09-04 15:50:53 -07:00
Victor Zverovich
5f438c967e
Remove make_arg
2024-09-04 14:52:14 -07:00
Victor Zverovich
2a257798d4
Reenable FMT_BUILTIN_TYPES
2024-09-04 14:10:40 -07:00
Vladislav Shchapov
22d50c1a9c
Add support formatting std::expected<void, E>
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2024-09-04 12:31:44 -07:00
Vladislav Shchapov
1cc10ab68f
Make is_formattable work with const/volatile void
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2024-09-04 12:31:44 -07:00
Victor Zverovich
6aaf7f4b79
Suppress a gcc 13 warning
2024-09-04 11:43:12 -07:00
Victor Zverovich
b4d1d7f8e6
Improve debug codegen
2024-09-04 08:56:25 -07:00
Victor Zverovich
3df47a4677
Make is_formattable work with void
2024-09-04 07:33:56 -07:00
Cameron Angus
b4aea98b55
Small fixes for some issues with modules builds ( #4152 )
...
* Avoid module export of member function definitions.
* Do not #include intrinsics header into module purview.
2024-09-04 07:29:41 -07:00
Victor Zverovich
e2b7238707
Cleanup format string API
2024-09-03 21:30:57 -07:00
Victor Zverovich
1e0c6cdc3b
Make symbol sizes shorter
2024-09-03 20:44:37 -07:00
Victor Zverovich
15694c9a84
Workaround an MSVC bug
2024-09-03 16:12:29 -07:00
Victor Zverovich
894b71da85
Fix handling of _BitInt
2024-09-03 11:32:31 -07:00
Victor Zverovich
7a6a2a79ed
Improve debug codegen
2024-09-02 20:29:24 -07:00
Victor Zverovich
387395fc7c
Cleanup base API
2024-09-02 15:15:38 -07:00
Victor Zverovich
6a88415499
Add FMT_APPLY_VARIADIC
2024-09-02 13:59:41 -07:00
Victor Zverovich
9a2aae37d4
Cleanup base API
2024-09-02 10:01:14 -07:00
Victor Zverovich
8803768363
Cleanup base API
2024-09-02 09:11:33 -07:00
Victor Zverovich
4fa533c70e
Cleanup base API
2024-09-02 09:00:44 -07:00
Victor Zverovich
d980dd7171
Cleanup base API
2024-09-02 07:50:46 -07:00
Victor Zverovich
4eed488c66
Cleanup base API
2024-09-02 07:17:21 -07:00
Victor Zverovich
a6ecd25b80
Improve debug codegen
2024-09-02 06:54:45 -07:00
Victor Zverovich
9f29345ea0
Simplify mapped_type_constant
2024-09-02 06:41:44 -07:00
Victor Zverovich
4986b4c0ef
Simplify arg_mapper
2024-09-01 21:59:39 -07:00
Victor Zverovich
a5f4d9820c
Simplify arg_mapper
2024-09-01 21:47:41 -07:00
Victor Zverovich
bc3af51272
Reduce the number of instantiations
2024-09-01 19:54:09 -07:00
Victor Zverovich
60740b7c24
Cleanup base API
2024-09-01 19:35:00 -07:00
Victor Zverovich
9ef160d309
Cleanup base API
2024-09-01 19:02:47 -07:00
Victor Zverovich
0b80978c27
Cleanup base API
2024-09-01 18:31:41 -07:00
Victor Zverovich
4f39d88650
Cleanup base API
2024-09-01 18:24:24 -07:00
Victor Zverovich
a86b1acf6a
Add mapped_t
2024-09-01 17:48:29 -07:00
Victor Zverovich
c9ef07bc4e
Minor cleanup
2024-09-01 17:34:47 -07:00
Victor Zverovich
8c4cfab57a
Detemplatize parse
2024-09-01 14:32:55 -07:00
Victor Zverovich
7e3aa6d982
Minor cleanup
2024-09-01 14:17:38 -07:00
Victor Zverovich
7c66216008
Minor cleanup
2024-09-01 12:53:09 -07:00
Victor Zverovich
1416edabbb
Cleanup base API
2024-09-01 12:06:40 -07:00
Victor Zverovich
b310a0d48b
Simplify parse_format_string
2024-09-01 11:09:26 -07:00
Victor Zverovich
985c3399d1
Make map static
2024-09-01 09:18:47 -07:00
Victor Zverovich
4a55b0d5fd
Remove duplicate error in compile-time checks
2024-09-01 09:03:34 -07:00
Victor Zverovich
64a6c84592
basic_format_parse_context -> parse_context
2024-09-01 08:09:37 -07:00
Victor Zverovich
66920feeee
Improve compile-time checks
2024-09-01 07:49:35 -07:00
Victor Zverovich
f4dad85c3a
Improve handling of named arguments in compile-time checks
2024-09-01 07:07:14 -07:00
Victor Zverovich
db4becabed
Reduce template instantiations
2024-08-31 20:29:58 -07:00
Victor Zverovich
fec2cc7af1
Improve handling of named arguments
2024-08-31 19:55:04 -07:00
Victor Zverovich
621e9c17c5
Clarify why we have TYPE in native_formatter
2024-08-31 17:50:21 -07:00
Victor Zverovich
bca7040556
Simplify compile-time checks
2024-08-31 15:01:25 -07:00
Victor Zverovich
8c4b17fe64
Simplify compile-time checks
2024-08-31 14:49:59 -07:00
Victor Zverovich
516a2e2049
Cleanup FMT_STRING
2024-08-31 14:13:57 -07:00
Victor Zverovich
6797f0c39a
Cleanup compile-time checks
2024-08-31 11:26:27 -07:00
Victor Zverovich
db496b47c1
Remove old gcc hack
2024-08-31 09:22:49 -07:00
Victor Zverovich
8eda3c8e90
Cleanup compile-time check
2024-08-31 08:38:53 -07:00
Victor Zverovich
53316903e6
Move string_literal to format.h
2024-08-31 07:08:35 -07:00
Victor Zverovich
8a484ad577
Minor cleanup
2024-08-30 20:53:54 -07:00
Victor Zverovich
b446cc9e67
fwrite_fully -> fwrite_all
2024-08-30 18:43:56 -07:00
Victor Zverovich
0204dd359d
Fix _BitInt formatter
2024-08-30 18:30:20 -07:00
Victor Zverovich
d8876b7787
Minor cleanup
2024-08-30 16:17:07 -07:00
Victor Zverovich
c0fab5e2f7
Reject modernity, embrace tradition
2024-08-30 11:26:29 -07:00
Victor Zverovich
64313e915c
Move redundant initialization to compile time
2024-08-30 10:51:35 -07:00
Victor Zverovich
8e3da9da2c
Improve binary size
2024-08-30 10:27:03 -07:00
Victor Zverovich
2a2f73f7c1
Improve binary size
2024-08-29 19:16:54 -07:00
Victor Zverovich
6dd9194abd
Simplify format_to_result
2024-08-29 18:35:42 -07:00
Victor Zverovich
a017bba062
Minor cleanup
2024-08-29 18:22:09 -07:00
Victor Zverovich
5eb023cd56
Improve binary size
2024-08-29 17:31:30 -07:00
Victor Zverovich
f213d83306
Disable locale more
2024-08-29 16:35:15 -07:00
Victor Zverovich
b3ccc2d210
Disable locale more
2024-08-29 15:08:43 -07:00
Victor Zverovich
7477dda28d
Simplify is_utf8_enabled
2024-08-29 14:39:26 -07:00
Victor Zverovich
e582d377c2
Simplify locale handling
2024-08-29 14:19:33 -07:00
Victor Zverovich
cd8d01d8cd
Minor cleanup
2024-08-29 11:41:43 -07:00
Victor Zverovich
377cf203e3
Add opt out for built-in types
2024-08-29 11:21:29 -07:00
Justin Riddell
5a0a37340c
Add support for _BitInt on clang ( #4072 )
...
Issue #4007
Make _BitInt up to 128bits formattable
Note, libstdc++ is_signed doesn't work with _BitInt (so use own)
2024-08-28 18:57:52 -07:00
torsten48
bbf8b3bd01
insert else branch to avoid unreachable code warning ( #4130 )
...
at least MSC caused warning C4702: unreachable code
2024-08-28 16:43:12 -07:00
Justin Riddell
a3f3f2ec9a
Fix gcc 8.1 - 8.3 bug and compilation ( #4131 )
...
Fixes issue #4129
2024-08-28 11:25:39 -07:00
Maxwell
e3676ca309
Change std::copy to detail::copy in chrono to fix MSVC compile errors ( #4132 )
2024-08-28 08:25:40 -07:00
Victor Zverovich
0379bf3a5d
Workaround -Wstringop-overflow
2024-08-24 07:56:09 -07:00
Anthony VH
c59ee969f3
Improve compile-time formatting ( #4127 )
2024-08-21 12:02:47 -07:00
Victor Zverovich
1a79bbfa83
Cleanup chrono formatting
2024-08-18 12:17:45 -07:00
Victor Zverovich
89af1ad77d
Cleanup chrono formatting
2024-08-18 11:55:33 -07:00
Victor Zverovich
0e741e0daa
Minor cleanup
2024-08-18 10:35:01 -07:00
Victor Zverovich
d1acc667c1
Minor cleanup
2024-08-18 09:33:29 -07:00
Victor Zverovich
4fb7008c90
Cleanup duration cast
2024-08-18 08:33:26 -07:00
Victor Zverovich
94b8bc8eae
Add an experimental writer API
2024-08-17 09:54:09 -07:00
Victor Zverovich
020af729dd
Simplify ostream
2024-08-17 08:38:10 -07:00
Victor Zverovich
3135421257
Minor cleanup
2024-08-12 07:59:42 -07:00
Victor Zverovich
993f56cff6
Make sign a proper enum class
2024-08-11 13:49:57 -07:00
Victor Zverovich
c6c830e203
Make align a proper enum class
2024-08-11 11:07:18 -07:00
Victor Zverovich
b906c321f0
Get rid of bit fields
2024-08-11 10:28:09 -07:00
Victor Zverovich
f8c0c8ee78
Cleanup public API
2024-08-11 07:29:17 -07:00
Victor Zverovich
50a8c3e9bf
Reduce format specs size
2024-08-10 09:34:35 -07:00
Victor Zverovich
98314319ad
Fix ambiguous overload
2024-08-09 15:01:40 -07:00
Victor Zverovich
bf870ae3d1
Fix back_inserter lookup for non-std containers
2024-08-09 07:10:15 -07:00
Hugo Sales
9f0c0c468b
Add 'n' specifier for tuple and pair ( #4107 )
2024-08-05 14:56:44 -07:00
Victor Zverovich
9f269062a7
Simplify default formatter
2024-08-05 14:24:07 -07:00
Victor Zverovich
15f939c3de
Improve handling of dynamic specs
2024-08-04 09:25:50 -07:00
Victor Zverovich
928a07bb04
Simplify handling of dynamic specs
2024-08-04 09:09:01 -07:00
Victor Zverovich
7891699737
Simplify handling of dynamic specs
2024-08-04 08:47:07 -07:00
Vladislav Shchapov
5ee14d3508
Reintroduce constexpr fmt::formatted_size for C++20 ( #4103 )
...
* Reintroduce constexpr fmt::formatted_size for C++20
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
* Disable constexpr fmt::formatted_size on Visual Studio 2019
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
---------
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2024-08-03 07:13:32 -07:00
Victor Zverovich
b9c0e4dd82
Improve spec parsing
2024-08-02 11:57:02 -07:00
Victor Zverovich
8445327c84
Simplify spec handling
2024-08-01 19:59:21 -07:00
Victor Zverovich
8a06cee826
Optimize shortest float formatting
2024-08-01 18:54:56 -07:00
Victor Zverovich
1db2274966
Use us if Unicode is disabled
2024-08-01 10:24:43 -07:00
Vladislav Shchapov
d326c7298a
Fix conversion a surrogate pair ( #4095 )
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2024-07-30 07:27:11 -07:00
Victor Zverovich
6e462b89aa
Get rid of std::copy
2024-07-29 15:58:05 -07:00
Vladislav Shchapov
aff640c32f
Make fmt::appender implement std::output_iterator concept ( #4093 )
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2024-07-29 09:18:20 -07:00
Victor Zverovich
e23fb6a8b4
Apply clang-format
2024-07-29 08:20:58 -07:00
Victor Zverovich
16b3542f7e
Remove float_specs
2024-07-27 12:28:21 -07:00
Victor Zverovich
29d7e58059
Remove float_format
2024-07-27 12:07:19 -07:00
Victor Zverovich
919f7c5e7f
Reduce float_specs usage
2024-07-27 11:38:55 -07:00
Victor Zverovich
a80d668a52
Diagnose invalid precision
2024-07-27 10:41:54 -07:00
Victor Zverovich
707d7d923a
Apply coding conventions
2024-07-27 09:00:25 -07:00
Victor Zverovich
ffdc3fdbd9
Align digits table
2024-07-24 18:43:37 -07:00
Cameron Angus
31b3c325f6
Mark namespace scope constexpr variable 'buffer_size' inline. ( #4084 )
...
* Mark namespace scope constexpr variable 'buffer_size' inline.
* Use provided macro for inline variable.
2024-07-24 09:58:38 -07:00
Victor Zverovich
0b0b09f401
Constrain format_uint
2024-07-23 06:30:35 -07:00
Victor Zverovich
4173a6315a
Improve format_decimal
2024-07-22 17:24:56 -07:00
Victor Zverovich
4239dfe081
Simplify format_decimal
2024-07-22 17:00:16 -07:00
Victor Zverovich
ba36a04811
Remove counting_iterator
2024-07-22 16:24:13 -07:00
Victor Zverovich
f6b4a23b83
Unbloat chrono
2024-07-22 15:46:58 -07:00
Victor Zverovich
7f157dca0a
Workaround gcc stringop-overflow bug
2024-07-22 11:31:35 -07:00
Victor Zverovich
524ca1c715
Improve parsing
2024-07-21 09:57:18 -07:00
Victor Zverovich
bdc45eef76
Simplify on_text
2024-07-21 08:31:03 -07:00
Victor Zverovich
439b6d7212
Reenable print optimization
2024-07-21 08:05:07 -07:00
Victor Zverovich
3cc32fdc8b
Mark more formatters nonlocking
2024-07-21 08:00:34 -07:00
Victor Zverovich
e84297f255
Bump version
2024-07-20 07:00:12 -07:00
Victor Zverovich
de684ef776
Make appender compatible with fill
2024-07-19 15:21:57 -07:00
Victor Zverovich
0f87d6ffa6
Improve sign processing
2024-07-17 16:13:27 -07:00
Victor Zverovich
9228f349a5
Inline visit
2024-07-14 15:34:53 -07:00
Victor Zverovich
f29a7e7970
Don't use memcpy in append
2024-07-14 13:02:21 -07:00
Victor Zverovich
f97deb0d7d
Minor cleanup
2024-07-14 11:14:49 -07:00
Victor Zverovich
3541353512
Apply minor optimization
2024-07-14 09:52:44 -07:00
Justin Riddell
5ef93a9f80
Expand FMT_FORMAT_AS to include implicit conversions ( #4055 )
...
Allows (for example) types convertible to std::string_view to inherit
from the fmt::formatter<fmt::string_view> to work etc.
2024-07-14 09:51:49 -07:00
Victor Zverovich
c9102619da
Avoid extra reserve
2024-07-14 08:41:35 -07:00
Victor Zverovich
58d792b6d3
Apply minor optimizations
2024-07-14 07:05:18 -07:00
Victor Zverovich
25adca5666
Remove redundant overload
2024-07-13 13:07:57 -07:00
Victor Zverovich
1408f1824d
Simplify iterator detection
2024-07-13 11:11:47 -07:00
Tor Shepherd
3fe4641d3a
Add 2 more constexprs to fix compile error ( #4065 )
2024-07-13 08:23:49 -07:00
Victor Zverovich
33e7ed1eb5
Improve handling of back_insert_iterator that writes into a buffer
2024-07-13 07:56:11 -07:00
Justin Riddell
13038f37e8
Support printing (const) volatile void* ( #4056 )
...
Fixes #4049
2024-07-10 08:35:06 -07:00
Justin Riddell
e60ff504ea
Fix usage with std::generator ( #4057 )
...
Fixes #4053
2024-07-09 08:46:34 -07:00
Victor Zverovich
92227c77a4
Improve support for non-POSIX platforms more
2024-07-08 14:00:00 -07:00
Victor Zverovich
486838f26f
Improve support for non-POSIX platforms
2024-07-08 11:18:44 -07:00
Victor Zverovich
7a8b54a0ef
Don't confuse Glib::ustring with std::string
2024-07-06 13:27:06 -07:00
Vladislav Shchapov
a96259701e
Improve std::complex formatter ( #4050 )
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2024-07-04 17:24:01 -07:00
Victor Zverovich
503e183b9e
Bump version and add version validation
2024-07-04 07:49:58 -07:00
toge
9d946a2fc4
Fix compilation errors due to make_format_args in gcc 14.1.1 with c++20 ( #4042 )
2024-07-03 12:41:08 -07:00
Nebojša Cvetković
c4f6fa7135
fix: Make basic_format_arg::visit() const ( #4043 )
2024-07-01 14:43:52 -07:00
Vladislav Shchapov
24c1f886af
Remove double has_value check ( #4040 )
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2024-07-01 09:24:33 -07:00
Victor Zverovich
686339f7c1
Minor cleanup
2024-06-30 10:29:50 -07:00
Victor Zverovich
53186535d5
Bump version
2024-06-29 08:54:52 -07:00
Victor Zverovich
7f951f2502
Optimize range formatter
2024-06-23 06:51:46 -07:00
Dix Lorenz
7ae102bd66
make format_int constexpr ( #4032 )
...
* make format_int constexpr
* format_int can only be constexpr in C++20
* apply clang-format
* drop constexpr for str()
2024-06-23 06:28:39 -07:00
Victor Zverovich
b1efe8516e
Prevent silent data loss
2024-06-22 07:46:16 -07:00
Matt Stafford
2c0d9e9409
Add a define to force the use of fallback_file
2024-06-21 09:42:02 -07:00
Victor Zverovich
18a9676d95
Add an experimental path
2024-06-21 08:14:20 -07:00
Vladislav Shchapov
514b6955d2
Suppress a bogus warning in MSVC ( #4023 )
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2024-06-19 08:49:43 -07:00
Matthias Moulin
ac96773230
Added missing std::declval for non-default-constructible types ( #4024 )
2024-06-18 11:27:40 -07:00
Victor Zverovich
c00149f5e2
Fix a typo
2024-06-17 06:58:33 -07:00
Victor Zverovich
71244e07de
Cleanup includes
2024-06-16 11:10:38 -07:00
Victor Zverovich
febd8ed5fe
Cleanup includes
2024-06-16 10:59:06 -07:00
Victor Zverovich
2a2048a785
Don't pass seconds as a double in examples
2024-06-15 09:26:49 -07:00
LoveSy
8687315e86
Guard more system headers by FMT_MODULE ( #4006 )
...
* Guard more system headers by `FMT_MODULE`
* Merge FMT_MODULE and FMT_IMPORT_STD
2024-06-14 10:53:51 -07:00
Victor Zverovich
e0b66e8f83
Remove dependency on <ranges>
2024-06-13 15:57:01 -07:00
Matthias Moulin
794df69c8c
Added range_format::(debug_)string formatter ( #3973 )
2024-06-13 15:43:29 -07:00
Victor Zverovich
1d9df9ce1c
Remove a redundant comment
2024-06-13 15:41:35 -07:00
LoveSy
fad0222a0c
Export compiled_string so that user can customize one ( #3999 )
2024-06-09 10:58:58 -07:00
LoveSy
2bf811b1d9
Also allow compiled format for clang >= 12 ( #4001 )
2024-06-09 06:43:39 -07:00
LoveSy
0f6e716548
Fix missing includes in fmt.cc ( #3994 )
...
This causes duplicated std definitions in the fmt module
2024-06-08 13:50:29 -07:00
Victor Zverovich
7bd11b5cdf
Remove a redundant extension to reduce divergence from std::format
2024-06-08 08:29:34 -07:00
LoveSy
94f96d112d
Fix undefined reference when compiling with FMT_STATIC_THOUSANDS_SEPARATOR and chrono.h
2024-06-05 21:01:42 -07:00
LoveSy
a9b8517638
Use native c++ module support from CMake
...
also fix some clang compilation issues when using c++ modules
2024-06-05 21:01:42 -07:00
Victor Zverovich
9b12491c19
Migrate docs
2024-06-02 14:20:41 -07:00
Victor Zverovich
ab29ef37d9
Migrate docs and cleanup
2024-06-02 13:17:04 -07:00
Victor Zverovich
97117cbb51
Migrate to mkdocs
2024-06-02 12:21:11 -07:00
Victor Zverovich
38ba3d3993
Migrate to mkdocs
2024-06-02 08:26:56 -07:00
Victor Zverovich
0714113974
Add macro support to api doc extraction
2024-06-02 08:06:52 -07:00
Victor Zverovich
03d14c3beb
Add support for multiple namespaces
2024-06-02 07:01:40 -07:00
Victor Zverovich
a10e032148
Improve docs
2024-06-01 20:08:41 -07:00
Victor Zverovich
febeb51bde
Documentation improvements
2024-06-01 17:45:06 -07:00
Victor Zverovich
933d8ba352
Improve apidoc formatting
2024-06-01 09:24:32 -07:00
Victor Zverovich
91a859ee4a
Switch to markdown
2024-06-01 08:56:26 -07:00
Victor Zverovich
a4d42c44f4
Cleanup comments
2024-06-01 07:00:56 -07:00
Eric Bryant
fcd3e1e19c
is_convertible_v -> is_convertible::value ( #3983 )
2024-05-31 10:02:59 -07:00
ZaheenJ
ca8eeb09ee
Add glibc ext for day of month and week of year ( #3976 )
2024-05-30 10:20:56 -07:00
Victor Zverovich
cf9833f40b
Cleanup apidoc comments
2024-05-29 20:30:19 -07:00
Victor Zverovich
33eba1049d
Minor comment fix
2024-05-28 11:39:49 -07:00
Matthias Moulin
43ab964c47
MSVC 17.10.0 + modules cannot find definition ( #3972 )
...
MSVC regressed since the new 17.10.0 compiler update. node<> cannot be found for detail::dynamic_arg_list::typed_node.
2024-05-28 11:34:44 -07:00
Matthias Moulin
728f9bc388
Added std::type_info formatter ( #3978 )
...
* Added std::type_info formatter;
* Reused std::type_info formatter in std::exception formatters;
* Updated MSVC std::type_info outputting to exclude all class, struct and enum occurences.
2024-05-28 10:57:08 -07:00
Matthias Moulin
1752d7fbbb
Added formattable concept ( #3974 )
2024-05-26 07:47:56 -07:00
Matthias Moulin
1768bf9714
Added FMT_EXPORT for fmt::range_format and fmt::range_format_kind ( #3970 )
2024-05-24 07:08:07 -07:00
Justin Riddell
fc723fd6c7
Fix regression in #3710 ( #3968 )
...
Regression introduced in 11f2f30
Already have a test for this, but needed to make __cpp_lib_ranges
smaller to enable it
2024-05-23 12:39:11 -07:00
Justin Riddell
b81761068b
Check range_begin is dereferenceable ( #3964 )
...
Fixes issue #3839
An Eigen 3.4 2x2 matrix has a begin member function that returns void
Be more strict checking that the result of calling *begin() is valid
See input_or_output_iterator concept notes about void
2024-05-20 16:11:07 -07:00
Matthias Moulin
706eabd5e5
Resolved warning C4127: conditional expression is constant ( #3967 )
2024-05-20 11:59:19 -07:00
Edoardo Lolletti
028bffa083
Update checks for dynamic_cast usage when compiled with no rtti ( #3963 )
...
* Rename FMT_USE_TYPEID to FMT_HAS_RTTI and use it as check to enable dynamic_cast usage
* FMT_HAS_RTTI->FMT_USE_RTTI
2024-05-19 11:21:55 -07:00
Victor Zverovich
75e892420e
Minor cleanup
2024-05-16 10:45:23 -07:00
Justin Riddell
8e728044f6
Fix format_as for non-const begin/end views ( #3955 )
...
base::format does not accept rvalues, using the result of format_as
directly means it is passed one. Doesn't matter for ranges with a const
begin and end, but filter_view caches, so it only has mutable begin/end.
Use auto&& to avoid copy if format_as returns const ref
2024-05-13 09:35:55 -07:00
Victor Zverovich
1f436c646e
Cleanup locking/buffering
2024-05-12 09:34:17 -07:00
Victor Zverovich
db1ee420e0
Cleanup unicode check more
2024-05-11 20:02:22 -07:00
Victor Zverovich
7d6ae972b9
Cleanup unicode checks
2024-05-11 19:43:46 -07:00
Victor Zverovich
3460b30fd5
Improve utf-8 detection
2024-05-11 18:58:40 -07:00
Victor Zverovich
b7809f91e2
Enable Unicode support by default
2024-05-11 15:11:23 -07:00
Victor Zverovich
1dc71f21ea
Enable Unicode by default
2024-05-10 18:27:45 -07:00
Victor Zverovich
8db8f22490
Optimize join_view
2024-05-09 17:26:26 -07:00
Victor Zverovich
d2473b7b73
Simplify join_view formatter
2024-05-08 15:42:49 -07:00
Victor Zverovich
328d256c60
Apply coding conventions
2024-05-06 15:10:29 -07:00
Victor Zverovich
57593a123b
Simplify map formatter
2024-05-06 15:09:31 -07:00
Justin Riddell
10508a30ec
Enable fmt::join for uncopyable iterators ( #3946 )
...
If iterator not copyable mutate the underlying iterator
Notably std::ranges::basic_istream_view::__iterator
Addresses issue (#3802 )
2024-05-05 15:44:23 -07:00
Victor Zverovich
16cec4f591
Make the map formatter correctly handle elements with custom formatters
2024-05-04 10:59:16 -07:00
Victor Zverovich
77bfd8499a
Split range and map formatters
2024-05-04 09:41:02 -07:00
Victor Zverovich
3af8ac7a06
Privatize write_debug_string
2024-05-04 07:38:58 -07:00
Victor Zverovich
ceb406d06c
Remove range_default_formatter
2024-05-04 07:20:40 -07:00
Victor Zverovich
7650ed04a3
Fix to_nonnegative_int
2024-05-03 07:49:16 -07:00
Alex Dewar
8a8f4825a3
Fix: isnan() shouldn't cause FP exceptions
...
Fixes #3948 .
2024-05-02 09:36:21 -07:00
Marlene Cota
48c908453d
Fix CodeQL alert ( #3945 )
2024-04-30 12:41:29 -07:00
Diego Ramírez
cf1f55f798
Specialize formatter for all std::basic_string types ( #3943 )
...
* Specialize `formatter` for all `std::basic_string` types
* mock-allocator: add member types to make GCC 4.8 happy
2024-04-23 08:44:41 -07:00
Victor Zverovich
400f6a8ee2
Dedup ADL begin/end lookup
2024-04-22 16:09:07 -07:00
Jiwoo Park
f4b256c667
Fix warning C26439
2024-04-19 09:06:46 -07:00
Victor Zverovich
f746a59a5c
Cleanup FMT_ASSERT
2024-04-19 08:36:16 -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
Justin Riddell
99735764ea
Fix FMT_USE_NONTYPE_TEMPLATE_ARGS define back ( #3937 )
...
Broken in refactor f1924d3
2024-04-16 13:29:30 -07:00
Matthias Moulin
116a9ce488
Added FMT_IMPORT_STD feature macro ( #3928 )
2024-04-10 11:48:32 -07:00
ShifftC
5eb68c0ef2
Fix mix-up of 'FMT_BEGIN_EXPORT' and 'namespace detail'. ( #3924 )
2024-04-08 09:46:20 -07:00
Matthias Moulin
550437b29e
Resolved warning C4127: conditional expression is constant ( #3923 )
2024-04-07 11:01:26 -07:00
Philippe Proulx
4e8640ed90
Fix: enable FMT_NORETURN without exception support too ( #3917 )
...
When building `format.cc` as such with GCC 13.2.1:
$ g++ -c format.cc -DFMT_EXCEPTIONS=0 -Wmissing-noreturn -Werror
I get:
In file included from format.cc:8:
fmt/format-inl.h: In function ‘void fmt::v10::detail::assert_fail(const char*, int, const char*)’:
fmt/format-inl.h:30:15: error: function might be candidate for attribute ‘noreturn’ [-Werror=suggest-attribute=noreturn]
30 | FMT_FUNC void assert_fail(const char* file, int line, const char* message) {
| ^~~~~~~~~~~
fmt/format-inl.h: In function ‘void fmt::v10::report_error(const char*)’:
fmt/format-inl.h:129:15: error: function might be candidate for attribute ‘noreturn’ [-Werror=suggest-attribute=noreturn]
129 | FMT_FUNC void report_error(const char* message) {
| ^~~~~~~~~~~~
cc1plus: all warnings being treated as errors
Note that, with `FMT_EXCEPTIONS` defined to 0:
‣ report_error(const char *) uses FMT_THROW() which expands to calling
assert_fail().
‣ assert_fail() calls std::terminate() which has the `[[noreturn]]`
attribute since C++11 [1].
Therefore, with `FMT_EXCEPTIONS` defined to 0, both assert_fail() and
report_error() need to have the `[[noreturn]]` attribute too (if
available). In other words, `FMT_NORETURN` doesn't depend on
`FMT_EXCEPTIONS`.
Also adding `FMT_NORETURN` to two on_error() functions which call
report_error(const char *).
Other report_error() overloads eventually return, therefore they don't
need `FMT_NORETURN`.
[1]: https://en.cppreference.com/w/cpp/error/terminate
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
2024-04-04 17:15:18 -07:00
Victor Zverovich
c70e7b7473
Coding conventions and minor fixes
2024-04-05 08:36:45 +09:00
zivshek
71144eeaff
implement year_month_day ( #3913 )
...
* implement year_month_day, also changed weekday, day, month, year's formatter to use formatter<std::tm, Char> so they all support the format strings
* support ":L" for month and weekday
2024-04-03 15:35:53 -07:00
Vladislav Shchapov
ca9193983b
Replace std::fill_n with fmt::detail::fill_n ( #3909 )
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2024-03-28 17:26:18 -07:00
zivshek
74a187288b
Implemented fmt::day, fmt::month, fmt::year and related unit tests ( #3906 )
2024-03-27 17:10:30 -07:00
Victor Zverovich
5d63e87d23
Add a formatter for float128
2024-03-22 15:41:50 +09:00
Victor Zverovich
aecec01b34
Initial support for extended FP types
2024-03-22 15:08:25 +09:00
Victor Zverovich
5af88653eb
Cleanup
2024-03-22 13:46:03 +09:00
Vladislav Shchapov
45b772f85c
Improve std::complex formatter to be compatible with P2197R0 ( #3900 )
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2024-03-20 13:31:32 -07:00
Victor Zverovich
53347891cf
Make line buffering test less flaky
2024-03-20 16:45:50 +09:00
Vladislav Shchapov
6c7cc6a06f
Fix group_digits for negative integers ( #3901 )
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2024-03-19 13:03:57 -07:00
Victor Zverovich
c0dac83982
Use p2197 format for complex by default
2024-03-19 07:55:45 +09:00
Victor Zverovich
bb882c03bc
Simplify path formatting
2024-03-19 07:47:42 +09:00
Vladislav Shchapov
12acd7988b
Fix ambiguous call
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2024-03-17 17:16:53 -07:00
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