Commit Graph
2193 Commits
Author SHA1 Message Date
Victor Zverovich 5fd89d50e4 Minor simplifications 2020-09-23 08:05:31 -07:00
Victor Zverovich 605ce5e429 Simplify divisible_by_power_of_2 2020-09-22 20:44:29 -07:00
Victor Zverovich 085171e7e6 Remove grisu_count_digits 2020-09-22 19:36:52 -07:00
Victor Zverovich aa729bf25b Remove dead code 2020-09-22 16:58:02 -07:00
Victor Zverovich aa2ddf9b86 Simplify Dragonbox integration 2020-09-22 16:20:40 -07:00
Victor Zverovich c1654ce487 Simplify uint32_or_64_or_128_t definition 2020-09-22 15:08:37 -07:00
Victor Zverovich 33712dc07a Combine pragmas 2020-09-22 14:47:35 -07:00
Victor Zverovich e5942ac9dd Tweak comments 2020-09-22 14:36:10 -07:00
Victor Zverovich aae7a1338c Remove unused pragmas 2020-09-22 14:00:41 -07:00
jk-jeon 6bcde9aab2 https://github.com/fmtlib/fmt/pull/1882#issuecomment-696823912 (#1894) 2020-09-22 10:33:52 -07:00
Victor Zverovich bb0db5e51e clang-format 2020-09-22 08:19:37 -07:00
Victor Zverovich 16410056bf Optimize copy_str for counting_iterator 2020-09-22 07:56:09 -07:00
mwinterb 2591ab91c3 MSVC optimizations for count_digits. (#1890)
Changed the clz implementations to use xor instead of subtraction so that when
count_digits "undoes" the BSR -> CLZ translation, the optimizer is more
willing to recognize the equivalence.
Changed the data array in bsr2log10 to static since otherwise MSVC generates
code to build the array every time the function is called.
2020-09-21 11:38:06 -07:00
jk-jeon 2e620ddbcd Small improvements that should have zero to negligible impact on the runtime (#1887) 2020-09-20 09:34:44 -07:00
Victor Zverovich 2f7e08856b Disable range formatter if value type is not formattable (#1885) 2020-09-20 08:37:49 -07:00
rimathia 2696dc9273 add forgotten template argument to make_format_args which made some u… (#1877)
* add forgotten template argument to make_format_args which made some uses of FMT_COMPILE not work anymore after 54daa0864a, add more elaborate test cases to compile-test as regression tests

* fix old-style cast which gcc on travis thankfully doesn't accept anymore

* hopefully last forgotten (void*)
2020-09-20 06:51:11 -07:00
Victor Zverovich 0016da7ab3 Don't generate zeros and fix UB on huge precision 2020-09-19 16:01:43 -07:00
Victor Zverovich ce3f76994a Merge intrinsic blocks 2020-09-19 07:54:45 -07:00
Junekey Jeon 3b6248f602 Change formatting 2020-09-19 07:23:41 -07:00
Junekey Jeon 2d9b1dd0ad Fix sign mismatch 2020-09-19 07:23:41 -07:00
Junekey Jeon 1f0600a23b Fix bug regarding FMT_SAFEBUFFERS 2020-09-19 07:23:41 -07:00
Junekey Jeon 2ecdbb986d Fix a bug in ctzll 2020-09-19 07:23:41 -07:00
Junekey Jeon 6f81ea151a Fix typo (and thus bug) 2020-09-19 07:23:41 -07:00
Junekey Jeon 0c8ffe9b0f Implement Dragonbox (first version) 2020-09-19 07:23:41 -07:00
jk-jeon 42699bf408 Fix msvc version of clz & clzll (#1880)
Change msvc version of clz & clzll to match __builtin_clz & _builtin_clzll
2020-09-18 11:07:01 -07:00
Axel Kohlmeyer bc51a8df04 Disable fallthrough attributes for the Intel compilers on Linux and MacOS (#1879)
* Disable fallthrough attributes for the Intel compilers

On MacOS and Linux the Intel compilers may be identified as the
host compilers (Clang or GNU) but do not support the corresponding
compiler specific fallthrough attributes.

* Rearrange ifdef logic for excluding pre-C++17 fallthrough attributes

This puts Intel and PGI compilers into a separate group
and thus makes the intent and logic more obvious.
2020-09-18 09:57:00 -07:00
Jan Schwers 45da432d60 fix compiler warnings in public header files 2020-09-17 15:53:53 -07:00
jk-jeon d55e61f120 Improve FMT_ALWAYS_INLINE (#1878)
1. FMT_ALWAYS_INLINE should imply inline; otherwise, there might be
   linkage problems
2. Add specialization for MSVC (__forceinline)
2020-09-17 15:21:17 -07:00
Victor Zverovich 7e6827521a Remove trailing zeros when using fallback formatter (#1873) 2020-09-17 08:16:21 -07:00
Victor Zverovich 1d696dc280 Handle exotic character types in compilation 2020-09-17 07:12:34 -07:00
Alexey OchapovandDmitriy Kurkin f674434a67 Add format_to_n overload that accepts FMT_COMPILE (from #1767) (#1869)
* Add format_to_n overload that accepts FMT_COMPILE

* add FormatToNWithCompileMacro test into CompileTest

Co-authored-by: Dmitriy Kurkin <Dmitriy.Kurkin@itiviti.com>
2020-09-15 07:28:06 -07:00
Victor Zverovich 5b5a597198 Fix handling of wide alignment 2020-09-15 06:53:06 -07:00
Victor Zverovich 3813966497 Simplify fallback format 2020-09-13 11:27:34 -07:00
Victor Zverovich dce8e49b4f Handle float in fallback formatter 2020-09-13 09:28:40 -07:00
Victor Zverovich 78b5944313 Spelling 2020-09-12 13:14:49 -07:00
Victor Zverovich f233b56cdd Don't generate insignificant digits 2020-09-12 09:19:50 -07:00
Victor Zverovich 58a044be5d Use built-in FP formatter for any precision 2020-09-11 07:19:45 -07:00
Victor Zverovich efe3694f15 Macro tweak and clang-format 2020-09-07 14:43:00 -07:00
Victor Zverovich 9f312fe87e Implement fallback FP formatting with given precision (#1526) 2020-09-07 09:34:30 -07:00
Victor Zverovich 86f0a7046e Fix formatting 2020-09-06 08:58:19 -07:00
Denis Blank bff4d18efb Add color format_to overloads
* Fix variable size basic_memory_buffer colorization
* Fix an unused arguments warning on GCC that blocks the CI otherwise
* Ref #1842
* Ref #1593
2020-09-06 08:24:15 -07:00
Ivan Shynkarenka f19b8885f2 Fixed a warning in mingw32/mingw64 (#1860) 2020-09-06 06:27:37 -07:00
Giovanni Cerretani f8e00a084a NOMINMAX not handled properly (#1855) 2020-09-03 09:45:47 -07:00
Victor Zverovich 6cccdc24bc Fix move constructor (#1844) 2020-09-01 08:48:56 -07:00
t-wiser 69902c1787 Allow use of <fcntl.h> in Linux when __has_include is not available (#1848) 2020-09-01 06:29:34 -07:00
t-wiser 1edd38b96e Add append mode. (#1847) 2020-08-31 15:48:39 -07:00
Adam Burgess f39e6fb617 Add formatters for chrono::time_point<system_clock> (#1837)
Add formatters for chrono::time_point and helper overloads for localtime/gmtime(time_point)
Fixes #1819
2020-08-28 07:41:38 -07:00
Victor Zverovich 77b627be20 Fix bogus MSVC warnings (#1825) 2020-08-26 12:33:54 -07:00
Alexander Lanin c7e6d8afb0 Fix usage of override (#1836) 2020-08-23 11:01:46 -07:00
Victor Zverovich 92bff2fe2c Revert "Add missing includes"
This reverts commit 06895a7687.
2020-08-21 16:24:53 -07:00