Commit Graph

4594 Commits

Author SHA1 Message Date
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
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
18024853b6 Fix compatibility with CMake 3.4 (#1779) 2020-07-17 06:41:25 -07:00
Léonard Gérard
f5d4215b7c
Trying to clear ambiguous compile time claims (#1775)
* Trying to clear ambiguous compile time claims

Documentation was a bit misleading.
Many people assume that fmt does compile time checks by default, while it requires the use of `FMT_STRING`.
It was also unclear that FMT_COMPILE does the same checks.

https://github.com/fmtlib/fmt/issues/1772

* Update api.rst
2020-07-16 06:19:49 -07:00
Victor Zverovich
c26349f4d2 Improve error reporting 2020-07-14 12:06:12 -07:00
Victor Zverovich
f4b11ef6e2 Add a short anchor 2020-07-14 09:39:22 -07:00
Victor Zverovich
0097cf113d Report unformattable type name more prominently 2020-07-13 08:46:53 -07:00
Victor Zverovich
8fa20b471b
dev -> latest 2020-07-13 06:15:47 -07:00
Dmitriy Vetutnev
a03bd3ddb0
Autodetect MSVC static runtime (#1770)
* Autodetect MSVC static runtime

* Update condition (MSVC)
2020-07-13 06:11:23 -07:00
Victor Zverovich
c108ee1d59 Clarify a comment 2020-07-12 10:59:33 -07:00
Victor Zverovich
a8074a865a
Update README.rst 2020-07-12 09:57:02 -07:00
Victor Zverovich
5f62954864
Update README.rst 2020-07-12 09:55:24 -07:00
Victor Zverovich
bd903f96ac Clarify precedence 2020-07-12 09:02:31 -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
e8ec09ae83 Cleanup core-test 2020-07-10 21:25:27 -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
Victor Zverovich
c5adfc51c5
Update README.rst 2020-07-09 06:21:02 -07:00
Victor Zverovich
c4ad94ce26
Update README.rst 2020-07-08 18:17:26 -07:00
Victor Zverovich
c1429651eb
Fix image source link 2020-07-08 13:34:47 -07:00
Vitaly Zaitsev
638db5ca5e Use Cmake to find Python and Sphinx-doc.
Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>
2020-07-08 08:06:57 -07:00
Victor Zverovich
c090569751 Update readme 2020-07-08 08:01:36 -07:00
Victor Zverovich
1efdb2dde4 Simplify readme 2020-07-08 07:47:18 -07:00
Victor Zverovich
dc69afad14 Cleanup example 2020-07-08 07:44:36 -07:00
Victor Zverovich
445f5d392b Break long lines 2020-07-08 07:36:07 -07:00
Victor Zverovich
23063c3444 Update readme 2020-07-08 07:11:13 -07:00
Victor Zverovich
f57b62575c Move PR template to the top level 2020-07-08 07:01:19 -07:00
Victor Zverovich
f19b1a521e Update version 2020-07-07 07:47:44 -07:00
Victor Zverovich
5c67fefb26 Fix a changelog entry 2020-07-07 06:58:44 -07:00
Dmitriy Kurkin
1d2a556e1b Fix undefined reference error 2020-07-07 06:37:17 -07:00
Victor Zverovich
04c9b62fb4 Merge release branch 2020-07-07 06:34:39 -07:00
Victor Zverovich
6be6762e57 Fix date 2020-07-07 06:32:19 -07:00
Victor Zverovich
f1dd2eb3c0 Bump version 2020-07-07 06:24:32 -07:00