Commit Graph

157 Commits

Author SHA1 Message Date
Victor Zverovich
158893b384 Cleanup 2024-09-06 13:39:03 -07:00
Victor Zverovich
d980dd7171 Cleanup base API 2024-09-02 07:50:46 -07:00
Victor Zverovich
4986b4c0ef Simplify arg_mapper 2024-09-01 21:59:39 -07:00
Victor Zverovich
60740b7c24 Cleanup base API 2024-09-01 19:35:00 -07:00
Victor Zverovich
8c4cfab57a Detemplatize parse 2024-09-01 14:32:55 -07:00
Victor Zverovich
985c3399d1 Make map static 2024-09-01 09:18:47 -07:00
Victor Zverovich
b906c321f0 Get rid of bit fields 2024-08-11 10:28:09 -07:00
Hugo Sales
9f0c0c468b Add 'n' specifier for tuple and pair (#4107) 2024-08-05 14:56:44 -07:00
Justin Riddell
e60ff504ea Fix usage with std::generator (#4057)
Fixes #4053
2024-07-09 08:46:34 -07:00
Victor Zverovich
7f951f2502 Optimize range formatter 2024-06-23 06:51:46 -07:00
Matthias Moulin
ac96773230 Added missing std::declval for non-default-constructible types (#4024) 2024-06-18 11:27:40 -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
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
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
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
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
400f6a8ee2 Dedup ADL begin/end lookup 2024-04-22 16:09:07 -07:00
Matthias Moulin
116a9ce488 Added FMT_IMPORT_STD feature macro (#3928) 2024-04-10 11:48:32 -07:00
Victor Zverovich
11f2f30f0b Simplify range formatter 2024-03-09 08:23:12 -08:00
js324
0861db500f Support character range formatting (#3863) 2024-03-07 10:51:46 -08:00
Victor Zverovich
8e62172ab6 Fix a warning 2024-01-29 07:48:48 -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
Victor Zverovich
fe0d910a7d Replace multiple error reporting mechanisms with report_error 2024-01-15 07:23:06 -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
Victor Zverovich
297b22f585 Remove <memory> dependency 2024-01-12 09:09:19 -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
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
0641b844ac Cleanup string traits 2024-01-05 19:31:04 -08:00
Victor Zverovich
50565f9853 Move misplaced join overloads to fmt/ranges.h 2024-01-01 16:28:59 -08:00
Victor Zverovich
a537c39fdf Move conjunction to where it is used 2023-12-23 14:35:11 -08:00
Victor Zverovich
e7875ae0fa Fix formatting of some nested ranges 2023-12-23 09:35:32 -08:00
Victor Zverovich
d5da9cc40e Apply clang-tidy 2023-12-19 17:52:50 -08:00
Victor Zverovich
e1fc481d65 Merge the copyright comment since there are many contributors 2023-09-04 06:54:07 -07:00