Commit Graph

1711 Commits

Author SHA1 Message Date
Victor Zverovich
bde1a6070d Simplify fill and alignment parsing 2022-12-23 10:52:56 -08:00
Shawn Zhong
8c56919bd2 Check chrono spec starts with % 2022-12-21 14:40:30 -08:00
Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com)
115001a3b1 Formatting of system clocks ought to be to UTC, not to local time.
This improves standards conformance of fmt.
2022-12-21 14:23:02 -08:00
Victor Zverovich
b90895412f Fix formatting of named arguments with locale 2022-12-15 09:59:40 -08:00
Victor Zverovich
3999fd193a Workaround an ADL issue 2022-12-11 09:32:17 -08:00
Vladislav Shchapov
1bf302a4ea Implement %Ez, %Oz for chrono formatter
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-12-10 10:13:53 -08:00
Radek Brich
62ceb181b1 fix #3105 - Compile-time error when mixing named argument with automatic indexing 2022-12-04 08:13:26 -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
115ca96e0e Bump tested CMake version to 3.25
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-11-30 08:09:32 -08:00
Vladislav Shchapov
886491625d Remove workaround for GTest bug
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-11-30 07:16:37 -08:00
Vladislav Shchapov
74c51ff37e Skip only strptime dependent test in scan-test
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-11-27 08:59:30 -08:00
Chris Thrasher
69ffedfe52 Use target_compile_features to specify C++ standard requirement 2022-11-26 11:03:17 -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
8276f1a204 Fix warning: the implicit by-copy capture of "this" is deprecated (EDG frontend)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-11-22 10:51:00 -08:00
thesmurph
c7980542d3
Skip the scan-test if strptime isn't defined (#3184)
cygwin and embedded systems. By default newlib doesn't provide strptime
in time.h because it was added in a later X/Open versions. Issue: #3178
2022-11-16 09:42:01 -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
Stepan Ponomaryov
795ed8abf5
Add precision modifier for seconds in chrono format (#3148)
Co-authored-by: Stepan Ponomarev <stepan.ponomarev@itiviti.com>
2022-11-02 11:58:51 -07:00
Barry Revzin
66d71a1b35
Fixing formatting of range of range of char. (#3158) 2022-11-02 11:04:54 -07:00
Vladislav Shchapov
cd7202e039
Fix overflow error (#3143)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-10-16 14:04:55 -07:00
Patrick Roocks
9254cfa6f0
Support formatting of subseconds (#3115)
* Timestamp formatting shall print also subseconds, fixed a bug for fractional durations
2022-10-12 14:33:53 -07:00
Tinson Lai
5ad7b71381
Fix options for C++20 experimental module in CMake (#3134)
* Fix options for C++20 experimental module in CMake

* Replace `FMT_CAN_MODULE` by `FMT_MODULE` in test/CMakeLists.txt
2022-10-12 08:23:12 -07:00
Vladislav Shchapov
662adf4f33
Move formatter<std::error_code> from fmt/os.h to fmt/std.h (#3125)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-10-01 17:46:09 -07:00
Vladislav Shchapov
ad91cab374
Normalization of stdlib inline namespace names (#3119)
* Normalization of stdlib inline namespace names

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>

* Remove all subnamespaces with names matching "__*" mask

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-09-29 09:52:38 -07:00
Patrick Roocks
ad719619cc
Support formatting of std time_point with utc_clock (#3110) 2022-09-28 07:31:53 -07:00
Victor Zverovich
0b5cb18b71 Use buffering in to_string to avoid bloat 2022-09-21 17:11:43 -07:00
Sergiu Deitsch
e2f6d7665b fix gcc <= 7.1 compile errors 2022-09-12 10:43:16 -07:00
Victor Zverovich
94ceb38a09 Improve locale API 2022-09-11 09:33:31 -07:00
Vladislav Shchapov
21c2137e77
Add class name output to formatter for std::exception (#3076)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-09-10 08:04:00 -07:00
Victor Zverovich
ecffca6726 Don't parse '}' as fill 2022-09-07 17:33:31 -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
Vladislav Shchapov
bac53951b8
Add starts_with to basic_string_view. (#3080)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-09-04 11:41:16 -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
91ecb38a34 Localize negative integers 2022-09-03 07:01:11 -07:00
Victor Zverovich
aec3bb5d0a Workaround C complex.h idiocy 2022-09-03 06:35:55 -07:00
NewbieOrange
29c6000137
Simplify is_variant_like_ check, fix compile error before GCC 11 (#3072)
Co-authored-by: Vladislav Shchapov <vladislav@shchapov.ru>

Co-authored-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-09-02 21:08:07 -07:00
Victor Zverovich
fec5515c55 num_format_facet -> format_facet 2022-09-02 18:55:08 -07:00
Victor Zverovich
f187274d36 Add loc_value 2022-09-02 13:45:23 -07:00
Victor Zverovich
fc5e59fe4a Don't use stringstream 2022-09-02 13:05:26 -07:00
Victor Zverovich
d6a8704605 Improve locale support 2022-09-02 11:52:19 -07:00
Victor Zverovich
56c72a671c Reduce locale dependency 2022-09-02 10:22:11 -07:00
Zach Toogood
4191477b98
Add formatter for std::exception (#3062)
Co-authored-by: fekir <federico.kircheis@gmail.com>
Co-authored-by: Alexey Ochapov <alexez@alexez.com>
Co-authored-by: Vladislav Shchapov <vladislav@shchapov.ru>

Co-authored-by: fekir <federico.kircheis@gmail.com>
Co-authored-by: Alexey Ochapov <alexez@alexez.com>
Co-authored-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-09-02 08:33:37 -07:00
Victor Zverovich
64e29893cf Improve locale support 2022-09-01 14:48:43 -07:00
Vladislav Shchapov
33b4c33c5b Requires FMT_CONSTEXPR20 support
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-08-29 13:33:48 -07:00
Vladislav Shchapov
a07411c2b9 Disable compile-time checks for dynamic width/precision test for LCC and compiler without std::is_constant_evaluated()
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-08-29 13:33:48 -07:00
Vladislav Shchapov
f98048b621
Fix bugs in utf8 decoder (#3056)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-08-26 15:37:15 -07:00
Victor Zverovich
4a8e2949bb Fix formatting of ranges of code unit types
Thanks Nicole Mazzuca.
2022-08-26 13:48:58 -07:00
Vladislav Shchapov
3a3b0709e2
Disable bogus -Wstringop-overflow on GCC 11 (#3054)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-08-24 12:37:34 -07:00