Commit Graph

431 Commits

Author SHA1 Message Date
Alexey Ochapov
b4d9d82e1d make FP formatting available to be used at compile-time (#2426)
* works only with FMT_HEADER_ONLY
* works only with float and double types (not long double)
2021-09-18 08:03:23 -07:00
Victor Zverovich
3d0c7ae385 Move data to format.cc 2021-09-13 06:23:57 -07:00
Victor Zverovich
9b6b0e403c Remove data 2021-09-12 09:46:00 -07:00
Victor Zverovich
4d1c6034eb Deprecate basic_data 2021-09-12 09:37:23 -07:00
Victor Zverovich
a3348eccdd Deprecate most of basic_data 2021-09-12 08:59:39 -07:00
Victor Zverovich
3a04481485 Remove data::hex_digits 2021-09-11 17:54:40 -07:00
Victor Zverovich
ad77331c04 Move log10_2_significand to format-inl.h 2021-09-11 09:36:23 -07:00
Victor Zverovich
d9ebc4e821 Add a function to get sign char 2021-09-11 09:17:59 -07:00
Victor Zverovich
e4728409e7 Use throw_format_error in more places to reduce bloat 2021-09-06 16:42:17 -07:00
Victor Zverovich
e3ebf366a6 Inline padding shifts 2021-09-06 16:26:50 -07:00
Alexey Ochapov
c79a3841e8 make detail::fp and detail::bigit constexpr 2021-08-26 17:16:45 -07:00
Victor Zverovich
6397095ca4 More escaping 2021-08-21 16:36:25 -07:00
Javier Honduvilla Coto
002bb759ff Remove unneeded num_result_bigits decrement
For what I see this seems unused?
2021-06-29 06:23:02 -07:00
Victor Zverovich
7c3d3dfa29 Update thousands_sep_impl signature 2021-06-04 21:12:47 -07:00
Victor Zverovich
5223f552c8 Remove FMT_ALWAYS_INLINE 2021-06-04 20:29:54 -07:00
Victor Zverovich
2ac0bfe59e Improve handling of thousands separator 2021-06-04 06:12:44 -07:00
Victor Zverovich
f4c95f6dd9 Improve handling of thousands separator 2021-06-03 18:25:08 -07:00
Victor Zverovich
8c1b22ba6d Workaround a gcc 9.1 bug (#2334) 2021-06-01 06:43:30 -07:00
Victor Zverovich
5a2b88f6e9 Reduce binary size 2021-05-29 16:45:43 -07:00
Alexey Ochapov
ee52a6dc40 add fmt::print() overload to support compiled format (#2304) 2021-05-25 14:54:56 -07:00
Victor Zverovich
c242dd402c Move cerrno include to where it is used 2021-05-22 06:18:40 -07:00
Victor Zverovich
21d93bfd33 Move generic format functions to format.h 2021-05-18 19:01:43 -07:00
Victor Zverovich
02896dabee Avoid use after move (#2278) 2021-05-11 16:58:07 -07:00
Victor Zverovich
16f2ef91ab Replace fmt::system_error with std::system_error 2021-05-07 08:33:39 -07:00
Victor Zverovich
c9c0e5077d Cleanup tests 2021-04-30 06:42:38 -07:00
Daniela Engert
d1a6e5603f Keep defaulted destructors inline
applies to exception classes in case of msvc only
2021-04-28 06:17:26 -07:00
Victor Zverovich
84a36b99bf Move data to functions 2021-04-27 17:21:32 -07:00
Victor Zverovich
5b2c740ad8 Remove deprecated APIs 2021-04-23 15:27:25 -07:00
Victor Zverovich
c47f211296 Simplify data handling 2021-04-23 06:52:10 -07:00
Victor Zverovich
54d3b1710e Move more data out of basic_data 2021-04-23 06:45:23 -07:00
Victor Zverovich
841aad95b4 Move data out of basic_data 2021-04-22 15:29:42 -07:00
Victor Zverovich
95da484727 Fix a link 2021-04-03 09:14:52 -07:00
Billy Donahue
308510eb4f "Use" fwrite result (workaround for warn_unused_result)
Fixes #2185
2021-03-31 08:31:35 -07:00
Victor Zverovich
af567538a0 Bitpack integral prefixes 2021-03-11 21:22:33 -08:00
John Steele Scott
772aeca338 Don't include <cassert>. (#2148) (#2152)
* Don't include <cassert>. (#2148)

This commit replaces use of the assert() macro in format-inl.h with
FMT_ASSERT(). This allows us to drop the cassert include.

* FMT_GCC_VERSION is not defined when we include test-assert.h, use __GCC__ instead.

* Don't explicitly suppress GCC's -Wterminate in tests' FMT_ASSERT.

Throwing from a separate function is enough to silence the warning, no need to
explicitly suppress it.

* Remove messages from assertions added in 2f699d2.

* Correct formatting around throw_assertion_failure().
2021-03-04 07:28:04 -08:00
Victor Zverovich
578874033a Revert "Optimize handling of integer constants" (#2147)
This reverts commit 2797588be1.
2021-02-25 05:58:58 -08:00
Victor Zverovich
2797588be1 Optimize handling of integer constants 2021-02-21 11:11:57 -08:00
Victor Zverovich
e8eff3b8fd Fix FMT_STATIC_THOUSANDS_SEPARATOR (#2142) 2021-02-21 07:42:12 -08:00
Victor Zverovich
13b117b5bc Improve code point computation 2021-02-13 08:46:19 -08:00
Victor Zverovich
9ec5592bb5 Fix writing to stdout when redirected to NUL on Windows (#2080) 2020-12-30 13:23:37 -08:00
Alexey Ochapov
bbd6ed5bc5 Add support of most format_specs for formatting at compile-time (#2056) 2020-12-25 06:40:03 -08:00
Victor Zverovich
bcc20b29df Implement compile-time checks by default 2020-11-15 17:24:36 -08:00
Walter Gray
befd7d4a2f Always use FMT_STRING internally where possible [Issue #2002] (#2006)
Co-authored-by: Walter Gray <walter.gray@getcruise.com>
2020-11-15 05:19:06 -08:00
Victor Zverovich
b5dac0f0f8 Reduce <algorithm> usage (#1998) 2020-11-11 09:12:15 -08:00
Victor Zverovich
6b7bfed40c Fix fallback float formatter at assymetric bounds (#1976) 2020-11-03 19:19:10 -08:00
Victor Zverovich
112755cf91 Remove FMT_SAFEBUFFERS (#1966) 2020-10-29 17:42:45 -07:00
Victor Zverovich
4081b2fe94 Fix ABI compatibility (#1961) 2020-10-29 11:29:47 -07:00
Tobias Hammer
2d9311e860 Remove accidental parenthesis (#1968)
fails only when FMT_BUILTIN_CTZLL is not defined
2020-10-29 07:08:06 -07:00
OptoCloud
bb68f6089b Removed [-Wsign-conversion] warning in GCC 2020-10-28 06:02:17 -07:00
Victor Zverovich
0ecb3d1829 Optimize alignment parsing 2020-10-21 12:45:11 -07:00