Commit Graph

2138 Commits

Author SHA1 Message Date
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
Victor Zverovich
2c8cd2db34 Fix handling of zero precision 2022-02-18 12:38:30 -08:00
Victor Zverovich
b6d56170fc Remove unnecessary inline 2022-02-18 07:41:55 -08:00
Victor Zverovich
05432e570e Use consistent indentation 2022-02-18 07:38:42 -08:00
Victor Zverovich
47da218cc3 Remove uintptr_fallback 2022-02-18 07:03:33 -08:00
Victor Zverovich
4ddab8901c Merge accumulator into int128_fallback 2022-02-18 06:17:28 -08:00
Victor Zverovich
d38f72aff2 Refactor fallback ints 2022-02-17 20:24:42 -08:00
Victor Zverovich
15c2a3bacc int128_t -> int128_opt 2022-02-17 20:03:25 -08:00
Victor Zverovich
532a69a639 Fix handling of 96-bit long double with -m32 2022-02-17 15:51:59 -08:00