Victor Zverovich
a91c7b286d
Cleanup the core API
2023-03-26 21:07:26 -07:00
Victor Zverovich
19c074e477
Remove deprecated fallback formatter
2023-03-26 08:45:06 -07:00
Victor Zverovich
41cfc739fe
Generalize format_as
2023-03-26 07:37:51 -07:00
Alecto Irene Perez
d9bc5f1320
Fix code causing spurious Wstringop-overflow warning
...
See #2989 , #3054 , and others
2023-03-18 09:29:54 -07:00
Victor Zverovich
98699719f8
Make # handling consistent with std::format
2023-02-26 10:15:16 -08:00
Victor Zverovich
507c3042d8
class -> typename
2023-02-18 10:23:42 -08:00
Russell Greene
6e6eb63770
[msvc] fix warning about non-inline variable
2023-02-11 09:45:13 -08:00
Victor Zverovich
44e0eea94e
Use FMT_HAS_INCLUDE and apply clang-format
2023-02-08 07:19:10 -08:00
Roman-Koshelev
99070899b7
Fix errors setting of FMT_USE_FLOAT128 ( #3259 )
2023-02-08 07:15:02 -08:00
jk-jeon
f89cd276f7
Refactor countl_zero fallback ( #3276 )
2023-01-17 15:04:34 -08:00
Shawn Zhong
39971eb336
Fix localized format for float-point numbers ( #3272 )
2023-01-15 11:47:24 -08:00
jk-jeon
0f42c17d85
Implement a new formatting algorithm for small given precision ( #3269 )
...
Implement the formatting algorithm for small given precision discussed in https://github.com/fmtlib/fmt/issues/3262 and https://github.com/fmtlib/fmt/pull/2750
2023-01-14 11:30:20 -08:00
Victor Zverovich
6056e07125
Simplify symbols
2022-12-30 19:35:05 -08:00
Victor Zverovich
aa99b86409
Minor cleanup
2022-12-30 18:51:15 -08:00
Victor Zverovich
caa6974942
Simplify parse functions
2022-12-30 16:34:36 -08:00
Victor Zverovich
a73a9b6a84
Refactor format string checks
2022-12-30 16:03:41 -08:00
Victor Zverovich
72785a3aba
Cleanup write
2022-12-30 13:53:55 -08:00
Victor Zverovich
739b600f40
Remove iterator shenanigans
2022-12-30 12:37:22 -08:00
Victor Zverovich
ffb9b1d13c
Improve handling of signed types
2022-12-30 10:31:39 -08:00
Victor Zverovich
32190859ec
Fix handling of char
2022-12-30 09:11:42 -08:00
Victor Zverovich
a921a596e7
Cleanup core.h
2022-12-26 07:46:31 -08:00
Victor Zverovich
bd12aaa98e
Simplify format string parsing
2022-12-25 12:31:38 -08:00
Victor Zverovich
dfb857ebef
Refactor format spec parsing
2022-12-25 07:25:32 -08:00
Victor Zverovich
d1745084e0
Simplify parse context
2022-12-24 15:20:24 -08:00
Victor Zverovich
407e7b7b6d
basic_format_specs -> format_specs
2022-12-24 14:34:50 -08:00
Victor Zverovich
3cf9794755
Cleanup format string parsing
2022-12-24 13:47:20 -08:00
Victor Zverovich
934c8e5f76
Refactor precision parsing
2022-12-24 13:29:23 -08:00
Victor Zverovich
840ec8569d
Cleanup width handlers
2022-12-23 19:18:35 -08:00
Victor Zverovich
1dadeb8a33
Refactor width parsing
2022-12-23 18:29:59 -08:00
Victor Zverovich
b90895412f
Fix formatting of named arguments with locale
2022-12-15 09:59:40 -08:00
Vladislav Shchapov
d24be2e95c
Add countl_zero function
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
2022-11-30 12:25:01 -08:00
Vladislav Shchapov
91c024ed33
Rename leading_v -> leading_xdigit
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
2022-11-25 09:08:40 -08:00
Vladislav Shchapov
31364732dc
Replace snprintf-based hex float formatter with internal implementation
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
2022-11-24 07:15:46 -08:00
Vladislav Shchapov
74d55a4938
Add missing operators
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
2022-11-24 07:15:46 -08:00
Vladislav Shchapov
81ebe70b9b
Fix warning: a class type that is not trivially copyable passed through ellipsis (EDG frontend)
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru >
2022-11-22 10:51:00 -08:00
Hans-Martin B. Jensen
7df30f91ae
Format unique_ptr with custom deleter ( #3177 )
...
* Format unique_ptr with custom deleter
Added deleter type to fmt::ptr unique_ptr overload. Deleter type is
part of the unique_ptr type.
* Review: apply clang-format
Co-authored-by: Hans-Martin B. Jensen <haje@eposaudio.com >
2022-11-13 21:54:32 -08:00
Ihor Dutchak
cfb34a0607
Avoid using uint as a type name ( #3137 )
...
Sometime `uint` is defined as a global type by the project's code directly or by some 3rdparty libraries (e.g. Qt or OpenCV).
Some versions of MSVC (e.g. v16.11.15) gives a type shadowing warning:
```
3rdparty\fmtlib\fmt\include\fmt/format.h(3251): warning C4459: declaration of 'uint' hides global declaration
opencv2/core/hal/interface.h(45): note: see declaration of 'uint'
```
This also causes a compilation failure when `/WX` is used.
2022-10-12 10:53:47 -07:00
Victor Zverovich
0b5cb18b71
Use buffering in to_string to avoid bloat
2022-09-21 17:11:43 -07:00
Victor Zverovich
ac85afaab6
Simplify format_error
2022-09-16 14:25:14 -07:00
Björn Schäpers
042af53324
Suppress -Wfloat-equal
...
Only NaN and Inf are not less than Inf and the check for NaN is done
before.
Solves:
.../fmt/include/fmt/format.h:2509:43: warning: comparing floating-point with '==' or '!=' is unsafe [-Wfloat-equal]
2509 | return !detail::isnan(value) && value != inf && value != -inf;
2022-09-13 11:14:30 -07:00
Victor Zverovich
192859c2b5
Optimize writing to buffers via back_insert_iterator
2022-09-12 15:32:12 -07:00
Victor Zverovich
94ceb38a09
Improve locale API
2022-09-11 09:33:31 -07:00
Victor Zverovich
58c4c012fa
Disable slow windows build and simplify write_loc
2022-09-11 08:35:09 -07:00
Victor Zverovich
c3494ae364
Refactor float localization
2022-09-11 07:47:27 -07:00
gerboengels
3176e0fad7
Add locale overload for formatted_size ( #3084 ) ( #3087 )
...
Co-authored-by: Gerbo Engels <gerbo.engels@ortec-finance.com >
2022-09-07 14:15:12 -07:00
Victor Zverovich
b98ffb7dbd
Improve locale handling
2022-09-04 21:07:30 -07:00
Victor Zverovich
d59b89e9cd
More locale
2022-09-04 11:23:45 -07:00
Victor Zverovich
58a5563a9f
Implement grouping
2022-09-04 09:01:26 -07:00
Victor Zverovich
1b94271ff6
Add support for UTF-8 digit separators
2022-09-03 11:01:05 -07:00
Victor Zverovich
768d79a839
Implement format_facet
2022-09-03 09:42:36 -07:00