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
Victor Zverovich
ce93a66dfb
Implement a fallback uint128_t
2022-02-17 07:37:09 -08:00
Victor Zverovich
6a13464059
Include 128-bit with other signed integers in specifier check
2022-02-16 16:57:06 -08:00
Greg Sjaardema
70de324aa8
Apply 2746 fix for NVidia compiler also ( #2770 )
2022-02-16 12:04:16 -08:00
Victor Zverovich
a1ea3e015b
Move built-in formatter specialization to core
2022-02-16 07:37:00 -08:00
Victor Zverovich
161059dd98
Add support for extended precision FP
2022-02-16 06:07:04 -08:00
Victor Zverovich
c4c6b42de7
Bump version
2022-02-15 13:36:59 -08:00
Victor Zverovich
2b6f7fc7a3
Add partial support for extended precision FP
2022-02-15 07:22:41 -08:00
Vladislav Shchapov
0a24a0714e
Clz builtin may be not constexpr (Issue #2761 ) ( #2762 )
2022-02-14 18:19:06 -08:00
jk-jeon
5594edaf67
Address https://github.com/fmtlib/fmt/issues/2763 ( #2765 )
2022-02-13 20:14:28 -08:00
Vladislav Shchapov
10e3b83a75
Replace `make_args_checked with make_format_args` ( #2760 )
...
* Replace make_args_checked to make_format_args
* Deprecate legacy make_args_checked
2022-02-13 20:13:35 -08:00
Junekey Jeon
083510f0f0
Add FMT_CONSTEXPR to rotr instead
2022-02-13 06:15:17 -08:00
Junekey Jeon
dba99bc860
Revert adding constexpr to rotr to satisfy C++11 compilers
2022-02-13 06:15:17 -08:00
Junekey Jeon
c04af4bfc7
Simplify remove_trailing_zeros
2022-02-13 06:15:17 -08:00
Junekey Jeon
b348caa9e9
Remove some C-style casts for consistency
2022-02-13 06:15:17 -08:00
Junekey Jeon
c8bd1e646e
Simplify remove_trailing_zeros
2022-02-13 06:15:17 -08:00
Junekey Jeon
9b23e9dcb8
Fix wrong comment/refer to a correct reference
2022-02-13 06:15:17 -08:00
Junekey Jeon
69f2c550ab
Remove std:: infront of uint32_t/64_t & add constexpr to rotr
2022-02-13 06:15:17 -08:00
Junekey Jeon
9b62310f03
Fix some conversion issues
2022-02-13 06:15:17 -08:00
Junekey Jeon
08d12f31d1
Fix typo
2022-02-13 06:15:17 -08:00
Junekey Jeon
dbddb1d066
Remove literal separator to satisfy some compilers
2022-02-13 06:15:17 -08:00
Junekey Jeon
7dbe3dcded
Recover log10_2_significand
2022-02-13 06:15:17 -08:00
Junekey Jeon
10642e6082
Optimize remove_trailing_zeros
2022-02-13 06:15:17 -08:00
Junekey Jeon
7b4323e1e0
Add rotr
2022-02-13 06:15:17 -08:00
Junekey Jeon
f1bd6f7731
Check r < deltai first, because that is the major branch chosen for short inputs
2022-02-13 06:15:17 -08:00
Junekey Jeon
5d8eb6a1a0
Reflect the new paper
...
- Change constants appearing in log & division computations
- Rename beta_minus_1 to beta
2022-02-13 06:15:17 -08:00
Victor Zverovich
8e2e4d4034
Suppress a gcc warning
2022-02-12 09:26:48 -08:00
Vladislav Shchapov
a44716f58e
Workaround to Intel compiler ( #2758 )
2022-02-11 06:25:42 -08:00
Vladislav Shchapov
c71b070168
Add missing const qualifier ( #2755 )
2022-02-10 10:51:32 -08:00
Victor Zverovich
afbcf1e8ea
Remove legacy C locale wrapper
2022-02-05 12:37:21 -08:00
Victor Zverovich
90325d0970
Fix stored type detection
2022-02-05 10:44:34 -08:00
Victor Zverovich
e2ba01fcb0
Fix overload ambiguity in print
2022-02-05 08:35:19 -08:00
Victor Zverovich
17b362f78c
Simplify ostream opt-in API
2022-02-04 18:33:59 -08:00
Victor Zverovich
f055ebbd25
Make ostream operators opt in to reduce the risk of ODR violations
2022-02-04 15:06:45 -08:00
Victor Zverovich
8a21e328b8
Remove problematic constructibility check
2022-02-04 12:20:02 -08:00
Victor Zverovich
31e743d06e
Don't use ostream for types convertible to string_view
2022-02-04 11:00:00 -08:00
Victor Zverovich
35c0286cd8
Simplify byte handling
2022-02-02 16:13:24 -08:00
Victor Zverovich
c7173a36a1
Drop :: and fix formatting
2022-02-02 07:00:33 -08:00
Charlie Barto
3e8372b96e
qualify unqualified calls to format in compile.h ( #2742 )
2022-02-01 18:41:19 -08:00
Barry Revzin
a34a97cc1d
Supporting ? as a string presentation type ( #2674 )
...
* Supporting ? as a string presentation type.
* Supporting ? as a char presentation type.
* Adding iterator_category to counting_iterator.
2022-01-30 08:55:28 -08:00
Victor Zverovich
1557ab7644
Add format_as for enums
2022-01-28 06:38:02 -08:00
Federico
b00a1eac75
Fixes NVIDIA HPC compiler and Intel ICC compatibility ( #2732 )
...
* Fixes NVIDIA HPC compiler and Intel ICC compatibility
* Fixes NVIDIA HPC compiler and Intel ICC compatibility
* Rename FMT_NVHPC_VERSION to FMT_NVCOMPILER_VERSION
Co-authored-by: Federico Busato <fbusato@nvidia.com>
2022-01-26 15:53:04 -08:00
Victor Zverovich
f7a809be6e
Clarify the choice of magic numbers and compute the most magic one
...
https://github.com/fmtlib/fmt/pull/2713#discussion_r788349826
2022-01-23 08:58:58 -08:00
Victor Zverovich
09fde7f4b8
Add fmt::underlying for enum classes
2022-01-22 08:06:22 -08:00
Victor Zverovich
0014024a2c
Don't rely on transitive includes
2022-01-21 15:03:28 -08:00
Victor Zverovich
c28500556a
FMT_NOEXCEPT -> noexcept
2022-01-20 16:55:47 -08:00
Junekey Jeon
6240d02011
Improve comments
2022-01-19 17:03:44 -08:00
Junekey Jeon
925b744ae8
Improve comments
2022-01-19 17:03:44 -08:00
Junekey Jeon
22b14ff252
Simplify cache recovery
2022-01-19 17:03:44 -08:00
Junekey Jeon
3dc26b44d3
Make a fallback path more compiler-friendly
2022-01-19 17:03:44 -08:00
Junekey Jeon
2e4038bf51
Simplify lines with __builtin_addcll and friends
2022-01-19 17:03:44 -08:00
Junekey Jeon
76336b4f63
Replace noexcept with FMT_NOEXCEPT
2022-01-19 17:03:44 -08:00
Junekey Jeon
9181983483
Fix syntax errors
2022-01-19 17:03:44 -08:00
Junekey Jeon
74097a149b
Remove now-unused stuffs
2022-01-19 17:03:44 -08:00
Junekey Jeon
21a1c53381
Fix typo
2022-01-19 17:03:44 -08:00
Junekey Jeon
04eea0f0a8
Remove now-unused stuffs
2022-01-19 17:03:44 -08:00
Junekey Jeon
35a468ed38
Simplify integer checks
2022-01-19 17:03:44 -08:00
Junekey Jeon
1882a7a2c1
Replace Dragonbox cache which allows simpler cache recovery & integer checks
2022-01-19 17:03:44 -08:00
Junekey Jeon
f4dd1b1b8b
Simplify Dragonbox Step 3.
2022-01-19 17:03:44 -08:00
Junekey Jeon
70561ed13e
Minimize the usage of built-in 128-bit ints
...
It usually generates slower code than manual handling.
2022-01-19 17:03:44 -08:00
Ivan Volnov
cdf1a3b530
Fix codecvt warning ( #2408 ) ( #2725 )
2022-01-19 10:26:09 -08:00