Commit Graph

1280 Commits

Author SHA1 Message Date
Victor Zverovich
6af30d8f75 Remove legacy workaround 2024-01-08 20:13:50 -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
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
ae9b0b521b Disable transitive includes 2024-01-06 15:22:13 -08:00
Victor Zverovich
0641b844ac Cleanup string traits 2024-01-05 19:31:04 -08:00
Victor Zverovich
e0b604beb1 Remove a redundant function 2024-01-04 15:59:33 -08:00
Victor Zverovich
794e1b6145 Remove redundant overload 2024-01-04 09:21:19 -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
63ce170853 Replace virtual dispatch with normal functions in buffers 2024-01-02 07:02:20 -08:00
Victor Zverovich
4ec9c2906b Apply coding conventions 2024-01-01 19:04:25 -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
Bruce Mitchener
ebd5c8f994 Consistently use fmt:: when invoking format_to. (#3779)
This has been done partially in previous commits:

* 2ac6c5ca8b
* 258000064d
* ba50c19e82
* 5ab9d39253

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
23826669cf Cleanup error handling 2023-12-31 07:51:57 -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
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
Victor Zverovich
afa85e46c3 Apply clang-format 2023-12-17 07:32:22 -08:00
js324
6025bd7c37 Add localized formatting to non-decimal presentation types of ints (#3750) 2023-12-15 07:51:25 -08:00
Victor Zverovich
8f83ee2ad1 Apply coding conventions 2023-11-30 08:24:02 -08:00
Victor Zverovich
2d1e4bb35e Remove a useless comment 2023-11-25 09:05:20 -08:00
Victor Zverovich
c13753a70c Fix handling of invalid Unicode in precision 2023-11-18 08:36:11 -10:00
Ole Bøe
864a8b5f38 fix: support optional<T> with format_as(T) (#3713)
Formatting a std::optional<T> where T had a custom format_as(T) function failed to compile with clang,
due to set_debug_format being hidden by private inheritance. This fix makes the function available through a using clause.
2023-11-16 15:02:33 -08:00
Victor Zverovich
649fe0fc8b Fix handling of null strings with the s specifier 2023-11-15 17:03:01 -10:00
Carl Smedstad
e0d3e346d2 Wrap Char in array to avoid pointer arithmetic (#3695)
This resolves the following finding reported by Coverity Static Analysis
v2023.6.1 on line 1964 of fmt/include/fmt/format.h:

  ptr_arith: Using &v as an array. This might corrupt or misinterpret
             adjacent memory locations.
2023-10-31 14:05:46 -07:00
Victor Zverovich
19276d7325 Fix an inconsistentcy between to_string and format 2023-10-28 08:05:11 -07:00
Dimitrij Mijoski
2a2c6e676f Fix flushing C++ iostreams before calling write_console() (#3689)
This change correctly implements https://wg21.link/P2539/ for both
C streams and C++ iostreams.

Fixes #3688.
2023-10-25 13:13:31 -07:00
Giel van Schijndel
f76603f21e fix: make std::bitset formattable again (#3660)
* fix: make std::bitset formattable again

It used to be formattable via operator<<(ostream&) implicitly. Make it
formattable again, but this time via formatter specialization.

* fix: make nested_formatter constexpr default constructible
2023-10-03 09:53:47 -07:00
Victor Zverovich
06b20387ae Optimize fractional_part_rounding_thresholds 2023-09-22 13:26:57 -07:00
Victor Zverovich
649f2460db Apply clang-format 2023-09-22 09:07:43 -07:00
Greg Sjaardema
7529af8f99 Workaround intel bug (#3652)
* Workaround intel bug

Potential workaround / restructure for the intel bug that is the cause of #3645.

Make the variable in the external struct instead an embedded static constexpr variable in the only function that uses the variable.

* Finish the proposed change -- remove struct accessor

* Refactor proposed intel fix.

Moved variable out of function to avoid specialization on Float.  Made it a separate function that is called from format_float.

* Fix incorrect function name.

* Add missing inline.
2023-09-20 18:57:55 -07:00
Sascha Scandella
8ef4db4b96 Use datatype of underlying data (#3647) 2023-09-19 07:31:36 -07:00
Victor Zverovich
0e01e46c11 Implement nested formatter 2023-09-18 14:21:21 -07:00
Dana Jansens
f6ca4ea199 Avoid a space in the UDL definition (#3610)
* Avoid a space in the UDL definition except on GCC before 4.9

Clang 18 has grown a warning about the space being deprecated which
is enabled by default in their nightly binaries. However GCC before 4.9
will reject the UDL definition unless there is a space there, so we need
to keep the space conditionally for it.

* Remove UDLs on GCC before 4.9 to simplify things

GCC before 4.9 rejects the syntax that is now
rejected on more modern compilers.

* Disable compile-error-test on GCC < 4.9

This avoids the UDL tests failing as GCC < 4.9 can not parse UDLs
without a space, but the space is malformed in modern compilers.
2023-09-18 08:09:42 -07:00