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
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
75383a87f9
Inline trivial functions
2022-09-01 18:25:23 -07:00
Victor Zverovich
48327a82e3
Make format.h compile faster
2022-09-01 17:06:47 -07:00
Victor Zverovich
b79ed4105a
Remove unnecessary type_identity
2022-09-01 16:29:08 -07:00
Victor Zverovich
64e29893cf
Improve locale support
2022-09-01 14:48:43 -07:00
Victor Zverovich
0b0f7cfbfc
hip workaround
2022-09-01 09:18:53 -07:00
Greg Sjaardema
40e414d823
Fix compilation error with gcc-7.2.0
...
Without the added line, the gcc-7.2.0 compiler will give the following error:
```
/opt/compiler-explorer/libs/fmt/trunk/include/fmt/format.h:1240:8: error: uninitialized variable 'buffer' in 'constexpr' function
Char buffer[digits10<UInt>() + 1];
^~~~~~
```
See https://godbolt.org/z/fh7TMs9qs
2022-08-30 10:55:57 -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
797d82b21a
Disable non-type template args for LCC
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-08-29 13:33:48 -07:00
Vladislav Shchapov
a553521d6d
Disable "GCC optimize" pragma for LCC
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-08-29 13:33:48 -07:00
Victor Zverovich
1f575fd5c9
Bump version
2022-08-27 08:55:39 -07:00
Victor Zverovich
91481f255c
Detemplatize code_point_length_impl
2022-08-26 15:45:00 -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
Victor Zverovich
e724bbea16
Fix wchar_t corner cases
2022-08-24 12:23:10 -07:00
Bernhard Manfred Gruber
665d9779ec
Disable non-type template args for nvhpc ( #3053 )
2022-08-24 10:56:45 -07:00
Victor Zverovich
391f922acc
Improve error reporting in format string compilation
2022-08-24 09:05:15 -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
1f95c34381
Fix sign handling with large code units
2022-08-20 07:46:58 -07:00
Olli Lupton
fbb568bce0
nvhpc/22.3: workaround for c++17 mode. ( #3043 )
2022-08-18 11:30:40 -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
Dimitrij Mijoski
8bd02e93b2
Reduce conditional compilation
2022-08-09 09:05:01 -07:00
Dimitrij Mijoski
d9c1c7353a
Use is_utf8() in print(std::ostream&, ...)
...
This patch concludes the Unicode support for print(ostream&, ...)
2022-08-09 09:05:01 -07:00
Hannes Friederich
b9087ee587
Suppress unused typedef warning
2022-08-05 15:27:01 -07:00
Vladislav Shchapov
90c48b8525
Remove double code execution
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-08-05 06:15:59 -07:00
Vladislav Shchapov
5a8b7cd742
Add comment
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-08-05 06:15:59 -07:00
Vladislav Shchapov
36a25d75b4
Reuse detail::string_literal in the chrono formatter
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-08-05 06:15:59 -07:00
Vladislav Shchapov
6c9304b2c2
Replace ParseContext with basic_format_parse_context
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-08-05 06:15:59 -07:00
Vladislav Shchapov
24ab9dd19e
Remove duplicate method
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-08-05 06:15:59 -07:00
Vladislav Shchapov
a95dc17017
Remove unused condition
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-08-05 06:15:59 -07:00
Victor Zverovich
5f774c0aed
I shouldn't be there
2022-08-02 16:35:50 -07:00
Vladislav Shchapov
6c6b1fbf6e
Workaround a bug in MSVC
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-08-02 06:46:02 -07:00
Victor Zverovich
6452e3c9eb
Fix a typo in example
2022-08-02 06:26:19 -07:00
Dimitrij Mijoski
756822ba39
Fix Unicode handling for ostream under Windows with libc++. ( #3001 )
...
Also replaces the SFIANE tricks applied in
ce7ecdb7af
with conditional compilation.
The code was too complicated along with the other trick to access private
data members.
2022-07-30 06:49:21 -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
Victor Zverovich
e9ca7ea472
Suppress a bogus warning
2022-07-28 07:12:49 -07:00
Dimitrij Mijoski
81f1cc74a7
Improve Unicode handling when writing to an ostream on Windows ( #2994 )
...
* Refactor detail::print() by splitting into two functions.
The part with SetConsoleW is a separate function, without fwrite().
* Make Unicode handing when writing to std::ostream more robust.
Calls to print(ostream&) in the special Unicode case on Windows fallback
to writing via ostream::write instead of fwrite().
* Fix Unicode handling when writing to an ostream on GCC on Windows
* Add TODO note about detail::is_utf8()
* Fix warning -Wundef
* Fix for non-Windows OSs
* Fix building as DLL on Windows
* Refactor
* Suppress warning
2022-07-23 08:03:31 -07:00
Victor Zverovich
48e0a59222
Implement compile-time checks for dynamic width/precision type
2022-07-22 17:00:40 -07:00
Federico
bc5c7c50fd
Fixes IBM XLC behavior with uint128 fallback ( #2985 )
...
* Fixes IBM XLC behavior with uint128 fallback
* Replace legacy xlc with clang-based xlc
* simplify xlc intrinsics handling
Co-authored-by: Federico Busato <fbusato@nvidia.com>
2022-07-22 13:49:17 -07:00
Victor Zverovich
371f9c71ca
Fix even in format_dragon
2022-07-19 08:36:34 -07:00
Victor Zverovich
91abfcd6cf
Suppress an msvc warning
2022-07-16 08:57:09 -07:00
Victor Zverovich
deeab54b40
Remove unused include
2022-07-15 20:11:35 -07:00
Junekey Jeon
688a627d6c
Remove unused constants.
2022-07-14 15:25:35 -07:00
Junekey Jeon
9bb1605f10
Remove some branches
2022-07-14 15:25:35 -07:00
Junekey Jeon
8061d9afbe
Simplify Dragonbox implementation
2022-07-14 15:25:35 -07:00
Victor Zverovich
d82e1a108d
Make sure the correct fmod overload is called
2022-07-13 12:42:03 -07:00
Vladislav Shchapov
defa04e730
Fix for EDG frontend (Intel, NVHPC compilers) ( #2982 )
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-07-13 11:34:43 -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
Federico
0db43cf7fe
Pointless comparison warnings ( #2971 )
...
Co-authored-by: Federico Busato <fbusato@nvidia.com>
2022-07-11 12:29:39 -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
Victor Zverovich
b761f1279e
Improve forward using the idea from Jonathan Müller
2022-07-07 16:48:17 -07:00
Victor Zverovich
cc1926942f
Inline std::forward
2022-07-07 14:41:54 -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
Victor Zverovich
fa2eb2d2e3
Bump version
2022-07-04 09:37:29 -07:00
Victor Zverovich
35f72bf210
Bump version
2022-07-04 09:10:55 -07:00
Victor Zverovich
55727e3b21
More compile-time checks
2022-07-04 08:25:27 -07:00
Vladislav Shchapov
115e00e0b9
Replace __cplusplus with FMT_CPLUSPLUS.
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-07-04 07:18:21 -07:00
Daniel Krügler
d2a2320820
Fix partial specialization problem for filesystem for Visual Studio ( #2957 )
...
* #2954 : Provide std::conjunction and std::disjunction substitutes
* #2954 : Use conjunction and disjunction substitute to make formatter specializations for ranges and maps more robust (especially for Visual Studio compiler family)
* #2954 : As workaround for older MSVC compilers split formatter<std::filesystem::path> partial template specialization into two explicit specialization.
* 2954: Add test case
* Provide simplified implementations of conjunction and disjunction
* Remove workaround explicit specializations if the partial specialization would cause an ambiguity error
* 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.
2022-07-03 11:06:54 -07:00
Victor Zverovich
0c06c81da8
Deprecated implicit conversion of enums to ints for consistency with scoped enums
2022-07-03 09:02:22 -07:00
Vladislav Shchapov
99bb5b1d17
Fix std::variant, std::filesystem::path tests on GCC-8, Clang-7,8.
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-07-02 08:34:52 -07:00
jehelset
6a775e9560
Add support for 'std::variant' in C++17 ( #2941 )
...
Add support for 'std::variant' in C++17.
For C++17, if all the alternatives of a variant are formattable
the variant is now also formattable. In addition 'std::monostate'
is now formattable.
Moves implementation into 'std.h', and tests into 'std-test.cc'.
Avoid fold-expression since MSVC was crashing.
Add section for 'fmt/std.h' in API-docs.
2022-06-26 07:28:01 -07:00
Victor Zverovich
9cb02aaaad
Fix UDLs
2022-06-25 08:52:10 -07:00
Victor Zverovich
e6d478f8e8
Update changelog and docs
2022-06-25 08:33:57 -07:00
Victor Zverovich
2d931b1497
Add fmt::streamed
2022-06-24 09:26:24 -07:00
Jonathan W
e8bd2a804d
Fix enable_ifs for map formatter ( #2944 )
2022-06-23 08:24:11 -07:00
Victor Zverovich
69a20db081
Update changelog and fix an apidoc comment
2022-06-22 08:32:46 -07:00
jehelset
5682338891
Fix is_formattable for tuple-like types. ( #2940 )
2022-06-19 08:25:58 -07:00
Victor Zverovich
eaa8efb950
Fix ofstream handling in msvc
2022-06-16 15:02:33 -07:00
Juraj
8e47cfd1cd
fix -Wsign-conversion warning
2022-06-11 12:31:33 -07:00
Victor Zverovich
b135f1c014
Refactor handling of argument types
2022-06-09 17:03:33 -07:00
Victor Zverovich
f61a1e8132
Add format_arg_types
2022-06-09 15:50:30 -07:00
Mattes D
48b7e3dafb
Added a FMT_STRING wrapper for system_error() call.
...
This enables the use of FMT_ENFORCE_COMPILE_STRING on MSVC 2019.
2022-06-07 07:00:57 -07:00
Victor Zverovich
4bb3af7a6b
Improve compile-time checks
2022-06-05 13:58:04 -07:00
Vladislav Shchapov
d02c582b96
Fix 'duplicate symbol' error.
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-06-05 07:17:25 -07:00
Vladislav Shchapov
b59d8c3a23
Make std::filesystem::path formatter utf-8 compatible.
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-06-04 10:10:21 -07:00
Victor Zverovich
9d60395953
Fix compilation on ppc64
2022-05-31 13:53:15 -07:00
Victor Zverovich
a2681aabcb
Debug ppc failure
2022-05-31 11:30:22 -07:00
Victor Zverovich
798d09bb70
Debug ppc failure
2022-05-30 13:06:34 -07:00
Victor Zverovich
8c7cf51395
Cleanup
2022-05-30 08:21:01 -07:00
Victor Zverovich
cdfacb4345
Cleanup parse_format_string
2022-05-30 07:30:11 -07:00
Victor Zverovich
926ddd0631
Move compile string to detail
2022-05-30 07:06:36 -07:00
Victor Zverovich
cb682f36f4
Move to_string_view to detail
2022-05-29 22:51:31 -07:00
Victor Zverovich
156744ad47
Simplify fmt::runtime
2022-05-29 21:18:52 -07:00
Victor Zverovich
d9c7166cf0
bi_iterator -> base
2022-05-29 21:01:57 -07:00
Victor Zverovich
fe6eb792d5
Cleanup check_format_string
2022-05-29 19:01:06 -07:00
Victor Zverovich
054b1d9808
Remove unused include
2022-05-29 18:24:10 -07:00
Victor Zverovich
e927149f8e
Cleanup macros
2022-05-29 17:23:02 -07:00
Victor Zverovich
1761e2666a
Remove FMT_CONSTEXPR_DECL
2022-05-29 16:42:58 -07:00
Victor Zverovich
d6b568a6cc
Cleanup string_view checks
2022-05-29 16:30:39 -07:00
Victor Zverovich
c83a5d42bb
FMT_MSC_VER -> FMT_MSC_VERSION
2022-05-29 15:39:08 -07:00
Victor Zverovich
27cd68c301
Cleanup macros
2022-05-29 14:45:59 -07:00
Victor Zverovich
08be4abb30
Remove FMT_NVCOMPILER_VERSION
2022-05-29 13:54:31 -07:00
Victor Zverovich
661b192545
Remove FMT_HEADER_ONLY_CONSTEXPR20
2022-05-29 13:22:45 -07:00
Victor Zverovich
d1026fa5d2
Remove extern format_float
2022-05-29 13:11:19 -07:00
Victor Zverovich
7e63b600b6
Make to_string work with __float128
2022-05-29 12:23:57 -07:00
Victor Zverovich
c2fcdc54e2
Move format_float to format.h for __float128
2022-05-29 11:30:33 -07:00
Victor Zverovich
2b9037a190
Move basic_fp to format.h for compile-time formatting
2022-05-29 07:32:52 -07:00
Victor Zverovich
542785ccbf
Get rid of detail::bits
2022-05-29 07:10:36 -07:00
Vladislav Shchapov
65dd2ea52c
Use write_escaped_string to std::filesystem::path.
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-05-28 07:48:02 -07:00
Vladislav Shchapov
9860f67cde
Improve xchar support for std formatters.
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-05-28 07:48:02 -07:00
Vladislav Shchapov
03b1b2838e
Improve std::filesystem::path formatter.
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-05-28 07:48:02 -07:00
Victor Zverovich
4f9311e689
Fix definition of error_handler::on_error
2022-05-27 10:49:19 -07:00
Ivan Shynkarenka
652fea45a9
Visual Studio 2022: fmt/format.h(1526,27): warning C4127: conditional expression is constant #2908
2022-05-27 10:38:13 -07:00
Vladislav Shchapov
1f9eae7e31
Add xchar support for write_escaped_string.
...
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-05-27 08:36:38 -07:00
Victor Zverovich
ce246aaf74
Remove deprecated APIs
2022-05-22 07:10:09 -07:00
Victor Zverovich
edeb3d8091
Remove deprecated APIs
2022-05-21 19:57:38 -07:00
Victor Zverovich
f5cdf7cb04
Simplify snprintf_float
2022-05-21 12:34:21 -07:00
Victor Zverovich
440512f08d
Remove deprecated APIs
2022-05-21 12:20:31 -07:00
Victor Zverovich
621eb80bbb
Remove deprecated APIs
2022-05-21 11:34:07 -07:00
Victor Zverovich
5c7d315ded
Remove locale.h
2022-05-21 08:19:09 -07:00
Victor Zverovich
c6324009ba
Add initial double-double support
2022-05-21 07:32:54 -07:00
frithrah
147e8ca580
Fix Windows max mix-up ( #2903 )
2022-05-18 16:35:26 -07:00
Victor Zverovich
6bf039d750
Add std: 🧵 :id formatter
2022-05-17 16:37:19 -07:00
Victor Zverovich
9730fb0156
Fix path formatter
2022-05-17 14:29:49 -07:00
Victor Zverovich
f0903ad9df
Add a path formatter
2022-05-16 17:32:25 -07:00
Ivan Shynkarenka
3e28dc021c
VS2022 17.2: C4189: 'zero': local variable is initialized but not referenced #2891 ( #2892 )
...
VS2022 17.2: C4189: 'zero': local variable is initialized but not referenced #2891
Co-authored-by: Ivan Shynkarenka <Ivan_Shynkarenka@epam.com>
2022-05-13 07:04:34 -07:00
Victor Zverovich
f6f920a1a8
Tweak a comment and apply clang-format
2022-05-11 14:40:26 -07:00
Victor Zverovich
ae963e444f
Implement constexpr isfinite to avoid producing NaN
2022-05-11 08:43:22 -07:00
Victor Zverovich
358f5a7e50
Make precision computation consistent with width
2022-05-11 06:34:51 -07:00
Sean McBride
f63afd161f
Fixed all clang -Wsigned-enum-bitfield warnings ( #2882 )
...
Made enums involved in bitfields unsigned by specifying their underlying type as unsigned char.
Due to a bug, when specifying an underlying type, gcc < 9.3 warns about bitfields not being big enough to hold the enum, even though they are. So keep the plain enum for old gcc.
An example of the bug is here:
https://godbolt.org/z/58aEv8zEq
2022-05-09 11:03:51 -07:00
Victor Zverovich
7e4ad40171
Add initial support for double-double
2022-04-24 07:43:02 -07:00
Victor Zverovich
5d804ee7fe
Fix handling of subnormals in exotic FP
2022-04-17 08:56:35 -07:00
Victor Zverovich
86e27ccb41
Suppress a warning
2022-04-12 09:30:29 -07:00
Victor Zverovich
192f79aaae
Fix handling of locale separators in FP formatting
2022-04-12 08:00:17 -07:00
Victor Zverovich
395cf0f03e
Fix detection of unformattable pointers
2022-04-12 06:45:46 -07:00
Victor Zverovich
fc429d18b6
Avoid overhead on sensible platforms
2022-04-11 16:52:34 -07:00
Victor Zverovich
ce7ecdb7af
Replace conditional compilation with SFINAE
2022-04-11 12:16:05 -07:00
Victor Zverovich
8751a03a04
Fix Unicode handling when writing to an ostream
2022-04-10 09:46:01 -07:00
Victor Zverovich
f607e3e970
Add __float128 support
2022-04-03 12:58:06 -07:00
Victor Zverovich
686de58886
Implement 128-bit constant mul in bigint
2022-04-03 07:24:18 -07:00
Victor Zverovich
02eb215f2f
Replace uint128_wrapper with uint128_fallback
2022-04-02 18:01:41 -07:00
Victor Zverovich
b4dc7a1d34
Add 128-bit operations to bigint
2022-04-02 09:29:13 -07:00
Victor Zverovich
ef54f9aa38
Suppress -Wfloat-equal
2022-04-01 12:18:22 -07:00
Jean-Michaël Celerier
288c3b928b
Remove dead code in ostream.h format_value
2022-03-29 10:21:19 -07:00
Victor Zverovich
96930161f9
Implement 128-bit operator+= for uint128_fallback
2022-03-27 08:07:54 -07:00
Victor Zverovich
b41890c1e5
Make arg_mapper SFINAE-friendly again
2022-03-27 07:10:15 -07:00
Victor Zverovich
e2408f37c8
Check if formatter is not defined if there is format_as
2022-03-26 09:44:49 -07:00
Victor Zverovich
db5b8993ac
Fix formatting of std::byte via format_as
2022-03-26 09:01:30 -07:00
Sean McBride
5379063b54
Fixed clang -Wreserved-identifier warings
...
Created FMT_UNCHECKED_TYPE that resolves to special identifier _Unchecked_type for Microsoft, but to a dummy string otherwise. Using
_Unchecked_type is invalid because underscore + uppercase is a reserved identifier.
2022-03-24 07:33:43 -07:00
Victor Zverovich
17dda58391
constexpr -> const for portability
2022-03-23 21:14:22 -07:00
Victor Zverovich
3c4273dd09
Simplify UDL
2022-03-22 17:43:37 -07:00
Victor Zverovich
44abd1f483
Update signatures in docs and ostream.h
2022-03-22 16:05:30 -07:00
Victor Zverovich
db745986f2
Workaround broken std::numeric_limits
2022-03-20 08:50:52 -07:00
Victor Zverovich
8271e43e5e
Improve __float128 support and use constexpr
2022-03-20 07:20:41 -07:00
Victor Zverovich
3f9b7433a3
Improve __float128 support
2022-03-19 09:44:14 -07:00
Victor Zverovich
71778e8b90
Specialize float_info for __float128
2022-03-19 08:39:16 -07:00
Victor Zverovich
f024565c3f
Improve exponent handling in Dragon
2022-03-19 08:23:32 -07:00
Victor Zverovich
e7f31f5cdb
Cleanup format_dragon
2022-03-18 16:03:19 -07:00
Victor Zverovich
3c61799fbf
Cleanup fuzzing mode
2022-03-18 12:01:52 -07:00
Victor Zverovich
4e39e13085
Remove xchar.h include from ostream.h
2022-03-18 10:53:15 -07:00
timsong-cpp
ac0d9d5fe2
Issue #2816 : also strip named-arg for the fallback formatter
2022-03-18 10:11:14 -07:00
timsong-cpp
4ad90578f7
Fix #2818 : diagnose unformattable arguments in unpacked case
2022-03-18 10:11:14 -07:00
timsong-cpp
17ba99c1d2
Fix #2817 : add compile-time checking to ostream overloads of fmt::print
2022-03-18 10:11:14 -07:00
timsong-cpp
3d19be282a
Fix #2816 : strip named argument wrappers for compile-time checking
2022-03-18 10:11:14 -07:00
Victor Zverovich
c076a54a4d
Move snprintf_float to format.h
2022-03-18 08:31:31 -07:00
Victor Zverovich
0419d23882
Add FMT_USE_FLOAT128
2022-03-18 07:43:51 -07:00
cre
69396347af
Update color.h ( #2815 )
...
fixed typo in comment
2022-03-17 10:55:02 -07:00
Victor Zverovich
bc654faf82
Add is_floating_point that works with __float128
2022-03-15 08:26:05 -07:00
Victor Zverovich
26bffce66d
Simplify basic_memory_buffer
2022-03-15 07:15:52 -07:00
Victor Zverovich
ed18ca3eae
Implement isnan
2022-03-14 20:37:46 -07:00
Victor Zverovich
a204b8dde7
Add initial __float128 support
2022-03-14 19:34:41 -07:00
Victor Zverovich
f2543b0a98
Add initial support for 128-bit floats
2022-03-14 14:00:15 -07:00
Victor Zverovich
72f487562d
Simplify float_info
2022-03-14 13:37:03 -07:00
Victor Zverovich
f91f61cd13
Reuse num_significand_bits
2022-03-14 11:34:24 -07:00
Victor Zverovich
9a1beab574
Workaround Windows API garbage
2022-03-11 17:31:39 -08:00
Riccardo Brugo
a8fe8becf4
Fix compilation error for ranges with ADL begin
/end
( #2807 )
...
* Use `range_begin`/`end` to get formatted range iterators
* Add test for adl `begin`/`end`
* Apply clang-format
* Simplify tests
2022-03-11 11:36:39 -08:00
Victor Zverovich
f6bcb25e16
Remove extra dot
2022-03-10 16:26:17 -08:00
Victor Zverovich
b4a4189d0c
Fix handling of implicit bit
2022-03-10 15:34:56 -08:00
Victor Zverovich
0b7c045a2f
Simplify _cf
2022-03-08 15:31:51 -08:00
rtobar
dcfbe4a77a
Document output_file default behavior correctly ( #2803 )
...
The documentation for output_file incorrectly says that opening an output file happens with `file::WRONLY | file::CREATE` by default, but this includes `file::TRUNC` is also included since 119f7dc3d
.
2022-03-08 10:02:22 -08:00
Riccardo Brugo
8c9bc070f5
Implement styled arguments ( #2793 )
...
* Implement styled arguments
* Inherit from formatter<Arg> to get the underlying `parse` and `format`
* Move styled_arg definition into the previous detail block
* Change styled_arg ctor parameters names to avoid shadowing members
* Move const before auto
* Remove redundant constructor for styled_arg
* Use the iterator instead of the buffer in styled_arg::format
* Remove unnecessary `styled` overloads
* Remove defaulted text_style parameter in styled function
2022-03-08 09:50:14 -08:00
Greg Sjaardema
5bc39d363a
Eliminate intel compiler warnings ( #2802 )
...
The intel compiler emits `declaration hides parameter "loc" ..." and similar warnings for "out" and "args" since the function arguments are the same as other visible symbols. This is for intel-2021.3.0 20210609.
2022-03-07 15:34:33 -08:00
Boris Dalstein
e3d688e79a
Fix warning C4251: class fmt::v8::file needs to have dll-interface ( #2797 )
...
* Fix warning C4251: class fmt::v8::file needs to have dll-interface
* Add CMake target dependency between test-main and fmt
2022-03-07 12:09:48 -08:00
Barry Revzin
0cef1f819e
Fixing formatting of certain kinds of ranges of ranges. ( #2787 )
...
* Fixing formatting of certain kinds of ranges of ranges.
* Renaming const_range to range_type.
2022-03-04 16:21:00 -08:00
Victor Zverovich
86477f7ecc
Fix size computation
2022-02-22 17:21:07 -08:00
Björn Schäpers
0742606f19
Fix Conversion Warning ( #2782 )
...
With -Wconversion and 32 Bit I get a warning here with unsigned long
long converted to unsigned long.
2022-02-22 08:16:36 -08:00
Victor Zverovich
1ba69fb5a1
Remove snprintf FP fallback
2022-02-21 08:01:55 -08:00
Victor Zverovich
ea6f0bf0e5
Minor cleanup
2022-02-21 07:29:36 -08:00
Ivan Shynkarenka
1a18a2f3dd
Fixing "C4127: conditional expression is constant" Visual Studio 2022 warning in pedantic mode ( #2783 )
2022-02-21 07:26:16 -08:00
Victor Zverovich
4fcacea354
Parameterized fp on significand type
2022-02-21 07:25:13 -08:00
Victor Zverovich
cf940ae82e
Simplify to_decimal
2022-02-20 19:38:02 -08:00
Juraj
70dc3de053
Update format.h
...
To prevent the following compiler message:
[...]/include/fmt/format.h:392:20: warning: conversion to 'long unsigned int' from 'int' may change the sign of the result [-Wsign-conversion]
392 | unsigned value[size];
| ^~~~
2022-02-20 11:38:03 -08:00
Victor Zverovich
cbc59ca893
Clear moved from memory buffer
2022-02-20 08:12:59 -08:00
Victor Zverovich
aad44f2839
Add fmt::enums::format_as
2022-02-19 08:03:42 -08:00
Victor Zverovich
1319719a5e
Add underlying_t
2022-02-19 07:57:43 -08:00
Victor Zverovich
af5d8004fc
Limit Dragonbox to supported FP formats
2022-02-19 07:14:18 -08:00
Victor Zverovich
7b96420961
Remove unused include
2022-02-18 18:56:51 -08:00
Victor Zverovich
a0b43bfae2
Add support for 96-bit long double
2022-02-18 18:01:49 -08:00