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
Victor Zverovich
e724bbea16
Fix wchar_t corner cases
2022-08-24 12:23:10 -07:00
Victor Zverovich
dc59d3df3f
Fix a warning in gtest
2022-08-24 07:18:14 -07:00
Vladislav Shchapov
489dabbd31
Fix decoder on broken utf8 sequences. ( #3044 )
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-08-24 07:13:27 -07:00
Victor Zverovich
541cd21838
Fix locale name (thanks Mikhail Paulyshka)
2022-08-20 08:06:20 -07:00
Victor Zverovich
1f95c34381
Fix sign handling with large code units
2022-08-20 07:46:58 -07:00
Victor Zverovich
779449fd99
Belarusify test
2022-08-20 07:37:15 -07:00
Dimitrij Mijoski
fc23cfbf4e
Fix testsuite on MinGW + MSVCRT
...
Fixes #2952 . The testsuite indirectly called strftime() with conversion
specifiers defined only in C99. In MSVCRT this function conforms only to
C89. Only in the updated UCRT this functon provides the functionality of
C99.
2022-08-14 08:40:38 -07:00
Mark Santaniello
fd93b633b8
Constexpr formatted_size ( #3026 )
...
* Constexpr formatted_size
* Add C++20 tests for gcc 9 and 10
* Adjust unit test to require __cpp_lib_bit_cast
2022-08-10 09:35:30 -07:00
Victor Zverovich
7fb8d33f9d
Fix compile-time width/precision type check
2022-08-09 16:10:02 -07:00
Victor Zverovich
5f774c0aed
I shouldn't be there
2022-08-02 16:35:50 -07:00
Barry Revzin
0b2862a1e4
Range formatter ( #2983 )
...
* Implement range_formatter and format_kind
* Attempted gcc 4.8 fix
* gcc 4.8 interprets inaccessible as a hard error (instead of... not available)
* Attempting to delete set_debug_format.
* clang-format
* Different implementation of FMT_STATICALLY_WIDEN
* Renaming copy_str_range to copy_str.
* I guess I need a definition
* Forgot to delete these.
* Other PR comments.
2022-07-29 13:55:16 -07:00
Dimitrij Mijoski
bbcb129e02
Reduce filesize of the tests on MinGW ( #2995 )
...
This patch removes the workaround applied here
1acfd07f1e
.
MinGW is not tested on Appveyor anymore.
2022-07-22 20:11:33 -07:00
Victor Zverovich
48e0a59222
Implement compile-time checks for dynamic width/precision type
2022-07-22 17:00:40 -07:00
Victor Zverovich
00adc7120d
Add a regression test for here be dragons
2022-07-22 11:08:00 -07:00
Barry Revzin
92d36e82c4
The n specifier for ranges ( #2981 )
...
* The n specifier for ranges.
* Flipping flag polarity.
2022-07-12 10:08:38 -07:00
Victor Zverovich
05be7a0764
Use FMT_USE_FLOAT128 instead of __SIZEOF_FLOAT128__
2022-07-10 08:54:34 -07:00
Victor Zverovich
2a1b3ac629
Fix large shift in uint128_fallback
2022-07-10 08:27:21 -07:00
Daniel Krügler
e1d3d3a326
Exclude recursive ranges from the formatter specialization for ranges ( #2974 )
...
* 2954: Add test case
* Eliminate extra-test and merge it into existing std-test instead. Add conditionals for filesystem::path testing that does not run into the ambiguity problem.
* #2968 : Introduce additional compile-time predicate to detect recursive ranges and reject them in formatter specialization for ranges. In addition, introduce additional wrapper traits for the individual logical operands of the complete range constraints
* #2968 : Eliminate preprocessor condition that enables the formatter specialization for std::filesystem::path
* #2968 : Eliminate preprocessor condition that enables the test for the formatter specialization for std::filesystem::path
* Use own bool_constant, which is available for all C++ versions
* Reintroduce previous workaround but restrict to VS 2015 for now
* Comma fix
* - Rename is_not_recursive_range to is_nonrecursive_range and add comment that explains it being depending on is_range being true
- Merge has_fallback_formatter_delayed into is_formattable_delayed and add comment that explains it being depending on is_not_recursive_range being true
- Replace disjunction in formatter specialization by has_fallback_formatter_delayed
- Get rid of unneeded detail:: prefixes within namespace detail
2022-07-10 06:26:23 -07:00
Vladislav Shchapov
b31d1a75a0
Add xchar support for fmt::streamed().
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-07-05 19:07:06 -07:00
Vladislav Shchapov
831132293b
Workaround for Microsoft Visual Studio 2022 Internal compiler error.
...
D:\a\fmt\fmt\test\compile-test.cc(362,3): fatal error C1001: Internal compiler error. [D:\a\fmt\build\test\compile-test.vcxproj]
(compiler file 'D:\a\_work\1\s\src\vctools\Compiler\CxxFE\sl\p1\c\constexpr\constexpr.cpp', line 8635)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-07-04 07:18:21 -07:00