Commit Graph

4736 Commits

Author SHA1 Message Date
Victor Zverovich
76cfb50b2d Test complex formatter 2020-08-03 10:05:18 -07:00
Victor Zverovich
208291205d Optimize count_digits 2020-08-02 07:58:36 -07:00
Victor Zverovich
8d9ab96736 Cut a few cycles from count_digits 2020-08-01 18:33:53 -07:00
Victor Zverovich
734344931f Simplify ostream_params 2020-08-01 18:33:53 -07:00
Victor Zverovich
2a47a1e48f
Update README.rst 2020-08-01 12:00:01 -07:00
Victor Zverovich
7c4c5c79d2 Make buffer size configurable 2020-08-01 10:53:58 -07:00
Kingcom
f0b84da5ff
Don't use 128 bit integers with clang-cl (#1800)
clang-cl currently has a long-standing bug that using 128 bit integers
generates references to symbols that are provided neither by its own nor
by the Microsoft runtime: https://bugs.llvm.org/show_bug.cgi?id=25305
2020-07-30 17:21:35 -07:00
Victor Zverovich
a3dfd6f927 Workaround a bug in msvc 2020-07-30 11:13:54 -07:00
Victor Zverovich
51d05521e9 Workaround broken numeric_limites, part 2 (#1787) 2020-07-30 09:42:24 -07:00
Victor Zverovich
21c8b5c142 Report error on missing named argument (#1796) 2020-07-30 07:16:15 -07:00
Victor Zverovich
d82fdcc9e2 Fix handling of iterators in locale-specific formatting (#1782) 2020-07-30 07:03:11 -07:00
Victor Zverovich
633213d96f Merge release branch 2020-07-29 08:52:53 -07:00
Victor Zverovich
b9d749095e Update version 2020-07-29 07:30:55 -07:00
Victor Zverovich
86b63bb71a Bump version 2020-07-29 07:14:25 -07:00
Victor Zverovich
cbf6be9604 Update changelog 2020-07-29 07:07:56 -07:00
Victor Zverovich
229ee9b469 Workaround broken numeric_limits (#1725) 2020-07-29 07:06:45 -07:00
Victor Zverovich
2b7a146fa1 Fix a regression in handling digit separators (#1782) 2020-07-29 07:04:11 -07:00
Victor Zverovich
89d0c7124b Fix compatibility with CMake 3.4 (#1779) 2020-07-29 07:03:59 -07:00
Victor Zverovich
e8f2580a43 Bump version 2020-07-28 09:25:15 -07:00
Victor Zverovich
6cefe55ac7 Update changelog 2020-07-28 09:15:02 -07:00
Victor Zverovich
64e2da15cd
Update README.rst 2020-07-28 08:35:28 -07:00
Victor Zverovich
1c8c810f88
Update README.rst 2020-07-28 08:32:37 -07:00
Victor Zverovich
c2399ccfca
Update README.rst 2020-07-28 08:21:04 -07:00
Victor Zverovich
a7c5db06d5
Update README.rst 2020-07-28 08:18:10 -07:00
Victor Zverovich
a4c22acd0a
Update README.rst 2020-07-26 12:12:31 -07:00
Victor Zverovich
0c1f4b5a0d
Update README.rst 2020-07-26 10:57:59 -07:00
Victor Zverovich
63b422ee5e
Update README.rst 2020-07-26 10:37:00 -07:00
Victor Zverovich
26e81a6731
Update README.rst 2020-07-26 10:29:03 -07:00
Victor Zverovich
de5fc6af3b
Update README.rst 2020-07-26 10:19:55 -07:00
Victor Zverovich
9c2edfd1aa Partially revert 638db5 because it breaks the doc build 2020-07-26 09:44:37 -07:00
Victor Zverovich
810357c014 Document color 2020-07-26 08:22:56 -07:00
Victor Zverovich
0a7032a400
Update README.rst 2020-07-26 08:14:18 -07:00
Victor Zverovich
95d3abf95c Make format_to_n part of the core API 2020-07-24 09:25:26 -07:00
Malcolm Parsons
98626093d2
Correct the locale format specifier in api.rst (#1792) 2020-07-23 21:01:54 -07:00
Victor Zverovich
47f8d7a345 Make formatted_size part of the core API 2020-07-23 08:51:38 -07:00
Victor Zverovich
46a63b7087 Update docs 2020-07-23 07:12:19 -07:00
TheQwertiest
430f393d6f
Disabled __attribute__((deprecated)) usage for LCC (#1790) 2020-07-23 06:34:03 -07:00
Tony E Lewis
febffa4e64
Make join() handle non-const-only begin/end ranges (#1786)
See fmtlib/fmt#1784.

Add tests that demonstrate the problem and check obvious variations.
2020-07-21 12:13:00 -07:00
Victor Zverovich
d69e2da221 Fix apidoc 2020-07-20 10:38:14 -07:00
Victor Zverovich
ce73ea37fb Reorder functions 2020-07-20 09:42:14 -07:00
Victor Zverovich
d39d661b18 Workaround broken numeric_limits (#1725) 2020-07-20 08:39:15 -07:00
Victor Zverovich
c228bfe882 Improve docs 2020-07-20 07:56:20 -07:00
Victor Zverovich
38ce19f738
Update README.rst 2020-07-20 07:29:57 -07:00
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
e2837084ee Add a color section 2020-07-19 09:51:52 -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
Raul Tambre
26b47b6fb5 Bump tested CMake version to 3.18
Use the version range feature introduced in 3.12. On CMake <3.12 the extra dots are simply interpreted as extra version number separators.
The fallback for ancient CMake versions is kept.
2020-07-19 08:50:34 -07:00
Victor Zverovich
7a01c9c523
Update README.rst 2020-07-18 09:17:10 -07:00