Khalil Estell
d11849bc0b
Add FMT_REDUCE_INT_INSTANTIATIONS flag ( #1781 )
...
* Remove <typename UInt> from int_writer
Reduce code bloat by removing multiple instantiation of int_writer based
on the <typename UInt> parameter.
Rationale:
- The only functions that gains a speedup by int size would be
int_writer::on_dec()'s call to count_digits which uses CLZ. Thus to
still take advantage of this speedup, we store the size of the int
so we can use a switch statement to call the correct count_digits.
- All other implementations of count_digits require some sort of looping
that terminates when the value hits zero regardless of what sized int
it is.
Caveats:
- There is a performance hit when dealing with and passing around
64-bit/128-bit values compared to 32-bit values on 32-bit platforms,
and with 64-bit values on 64-bit systems. But this should not reduce the
performance that dramatically.
- There is also a performance hit for on_dec() due to the addition of a
switch case. But, due to it size, this should reduce to a jump table.
Resolves #1778
* Add FMT_USE_SMALLEST_INT flag
When defined and set to zero, will use the largest available integer
container for writing ints. The has the benefit of reducing instances
the of int_writer class which will reduce the binary cost.
* Rename flag to FMT_REDUCE_INT_INSTANTIATIONS
Add comment above FMT_REDUCE_INT_INSTANTIATIONS definition describing
why a developer would use it.
* Move FMT_REDUCE_INT_INSTANTIATIONS to format.h
Co-authored-by: Khalil Estell <kammce@google.com>
2020-07-19 13:09:10 -07:00
Victor Zverovich
c08518a25b
Move make_args_checked to the public API
2020-07-19 10:23:46 -07:00
Victor Zverovich
9f0c003371
Simplify format string checks
2020-07-19 09:24:11 -07:00
Victor Zverovich
d615137ca0
Improve handling of buffer iterator
2020-07-19 09:02:26 -07:00
Victor Zverovich
b17d5c4f5d
Fix a regression in handling digit separators ( #1782 )
2020-07-18 08:31:47 -07:00
Victor Zverovich
eb90da2e82
Type erase output iterators
2020-07-18 07:50:29 -07:00
Victor Zverovich
9d3cd0afb2
Type erase output iterators
2020-07-17 12:57:50 -07:00
Victor Zverovich
c26349f4d2
Improve error reporting
2020-07-14 12:06:12 -07:00
Victor Zverovich
0097cf113d
Report unformattable type name more prominently
2020-07-13 08:46:53 -07:00
Victor Zverovich
c108ee1d59
Clarify a comment
2020-07-12 10:59:33 -07:00
Victor Zverovich
16cac46a09
Improve handling of streamable and convertible to bool types ( #1766 )
2020-07-12 08:34:45 -07:00
Victor Zverovich
415cd51913
direct_buffered_file -> ostream
2020-07-11 17:29:17 -07:00
Victor Zverovich
e1bfb59619
Fix handling of code units in compile
2020-07-11 09:03:21 -07:00
Victor Zverovich
ba8d98cbb7
Cleanup direct_buffered_file
2020-07-11 08:27:37 -07:00
Victor Zverovich
04a1f6e991
Improve handling of single code units in compile
2020-07-11 08:21:14 -07:00
Victor Zverovich
e4f57bfd7f
Add an overload of write for buffer_appender
2020-07-11 08:20:30 -07:00
Victor Zverovich
d870468159
Make append work with fixed-size buffer
2020-07-11 07:27:20 -07:00
Victor Zverovich
a2c4fed981
Double buffering no more
2020-07-10 20:35:14 -07:00
Victor Zverovich
36406509d9
Add a fixed buffer
2020-07-10 06:30:37 -07:00
Victor Zverovich
60c43e8703
Apply clang-format
2020-07-09 09:06:24 -07:00
Victor Zverovich
b998e0f30b
Reduce symbol sizes and simplify iterator use
2020-07-09 08:51:43 -07:00
Dmitriy Kurkin
1d2a556e1b
Fix undefined reference error
2020-07-07 06:37:17 -07:00
Victor Zverovich
f1dd2eb3c0
Bump version
2020-07-07 06:24:32 -07:00
Victor Zverovich
fbf3b943cc
Workaround a bug in gcc
2020-07-07 06:06:50 -07:00
Victor Zverovich
9f0b3afb79
Bump version in namespace
2020-07-06 09:47:27 -07:00
Victor Zverovich
569a9b3a7f
Bump version
2020-07-05 07:59:11 -07:00
Victor Zverovich
01309a34ab
Deprecate arg_formatter
2020-07-04 07:29:11 -07:00
Victor Zverovich
d8e0554b97
Disable numeric formatting by default
2020-07-03 10:35:49 -07:00
Victor Zverovich
56fed78149
FMT_NUMERIC_ALIGN -> FMT_DEPRECATED_NUMERIC_ALIGN
2020-07-03 08:53:01 -07:00
Victor Zverovich
56e63078ff
Make the n specifier an opt-in
2020-07-03 08:02:48 -07:00
Florin Iucha
31ce6bc702
Fix a conversion warning with Clang10 on Windows ( #1750 )
...
Fixes #1747
2020-07-03 05:53:42 -07:00
Tobias Hammer
5de62af604
Fix possible infinite recursion in FMT_ASSERT ( #1744 )
...
Use std::fprintf for assertion message output preventing infinite
recursion when output to stderr is limited or broken.
2020-07-01 08:28:27 -07:00
Victor Zverovich
f69b6eaabd
Add a simple buffered stream with no sync
2020-06-28 09:55:29 -07:00
Victor Zverovich
ba363b3a24
Use digit pairs as in unrolledlut
2020-06-27 12:05:38 -07:00
Victor Zverovich
98a7a8b405
Update changelog and disable internal
2020-06-26 19:07:33 -07:00
Victor Zverovich
3135d95fd9
Don't use non-portable attribute
2020-06-26 10:21:14 -07:00
Victor Zverovich
8630a8f5ff
Tweak the docs
2020-06-25 11:29:49 -07:00
Victor Zverovich
79c4b6bd70
Apply clang-format
2020-06-25 08:12:10 -07:00
Victor Zverovich
d130ee070f
Document format string compilation
2020-06-25 08:12:10 -07:00
Greg Sjaardema
d0f90b5be7
Spelling fixes
2020-06-24 06:29:54 -07:00
Greg Sjaardema
31c3a24266
Spelling fixes
2020-06-23 15:56:16 -07:00
Greg Sjaardema
613b3b459d
Spelling fixes
2020-06-23 15:55:31 -07:00
Victor Zverovich
978521bb81
Fix a compile error introduced in #1738
2020-06-23 15:17:43 -07:00
Victor Zverovich
4e94c649f9
Deprecate compile
2020-06-23 14:03:37 -07:00
Victor Zverovich
1a83443e6c
Add user-defined type support to compilation
2020-06-23 12:45:57 -07:00
Leonid Yuriev
8bef1c3b3a
Tweaks for EDG based compilers (Intel, nVidia, MCST/Elbrus, etc).
...
Using the __EDG_VERSION__ macro for checks related to EDG-based
compilers instead of a macros specific for each of ones.
2020-06-23 05:50:25 -07:00
Victor Zverovich
2cac8a9d2e
Reintroduce UDT support to fmt::to_string and test ADL
2020-06-21 09:21:07 -07:00
Victor Zverovich
9a4cc88426
Add FMT_COMPILE support to format_to
2020-06-20 15:15:41 -07:00
Victor Zverovich
5ddf9ee1bd
Streamline default FP formatting
2020-06-20 07:12:50 -07:00
Gabi Melman
5aa5c98738
Added #define WIN32_LEAN_AND_MEAN before including windows.h ( #1729 )
...
Co-authored-by: gabime <gmelman1@mgail.com>
2020-06-17 07:44:03 -07:00