Commit Graph

3010 Commits

Author SHA1 Message Date
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