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 Ochapov
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
Victor Zverovich
a0dcfbc57b
Add ptr to docs
2020-08-21 06:54:05 -07:00
Alexey Ochapov
1651b2d433
Fix detail::write with fallback formatter ( #1829 )
...
* add support for fallback_formatter in detail::write
* add ToString test into OStreamTest
to check fmt::to_string() with class that has output stream operator
* add WithOstreamOperator test into CompileTest
to check fmt::format() with FMT_COMPILE() and class that has output stream operator
* use conditional_t inside detail::write instead of 2 overloads
* Revert "add WithOstreamOperator test into CompileTest"
* remove Context from template parameters in detail::write
2020-08-20 06:41:09 -07:00
Victor Zverovich
06895a7687
Add missing includes
2020-08-19 20:33:04 -07:00
Victor Zverovich
92a448a071
Apply clang-format
2020-08-19 10:42:22 -07:00
Barry Revzin
6be6544668
Fixing buffer_appender's ++ slicing ( #1822 )
...
* Fixing buffer_appender's ++ slicing.
* This test requires C++14.
* Removing string_view dependency.
* Simplifying test case.
* Adding message to static_assert
2020-08-18 12:37:56 -07:00
Greg Sjaardema
76e97dc4df
Eliminate shadowed variable warnings on intel ( #1816 )
...
The intel-19 compiler warns about hidden variables:
```
/s/dev/nightly/libraries/ioss/src/fmt/format.h(2689): warning #1599 : declaration hides variable "begin" (declared at line 2668)
FMT_CONSTEXPR void operator()(const Char* begin, const Char* end) {
^
detected during:
instantiation of "Context::iterator fmt::v7::vformat_to<ArgFormatter,Char,Context>(ArgFormatter::iterator, fmt::v7::basic_string_view<Char>, fmt::v7::basic_format_args<Context>, fmt::v7::detail::locale_ref) [with ArgFormatter=fmt::v7::detail::arg_formatter<fmt::v7::detail::buffer_appender<char>, char>, Char=char, Context=fmt::v7::format_context]" at line 3492
instantiation of "fmt::v7::detail::buffer_appender<Char> fmt::v7::detail::vformat_to(fmt::v7::detail::buffer<Char> &, fmt::v7::basic_string_view<Char>, fmt::v7::basic_format_args<fmt::v7::basic_format_context<fmt::v7::detail::buffer_appender<fmt::v7::type_identity_t<Char>>, fmt::v7::type_identity_t<Char>>>) [with Char=char]" at line 1413 of "/s/dev/nightly/libraries/ioss/src/fmt/format-inl.h"
/s/dev/nightly/libraries/ioss/src/fmt/format.h(2689): warning #1599 : declaration hides variable "end" (declared at line 2669)
FMT_CONSTEXPR void operator()(const Char* begin, const Char* end) {
^
detected during:
instantiation of "Context::iterator fmt::v7::vformat_to<ArgFormatter,Char,Context>(ArgFormatter::iterator, fmt::v7::basic_string_view<Char>, fmt::v7::basic_format_args<Context>, fmt::v7::detail::locale_ref) [with ArgFormatter=fmt::v7::detail::arg_formatter<fmt::v7::detail::buffer_appender<char>, char>, Char=char, Context=fmt::v7::format_context]" at line 3492
instantiation of "fmt::v7::detail::buffer_appender<Char> fmt::v7::detail::vformat_to(fmt::v7::detail::buffer<Char> &, fmt::v7::basic_string_view<Char>, fmt::v7::basic_format_args<fmt::v7::basic_format_context<fmt::v7::detail::buffer_appender<fmt::v7::type_identity_t<Char>>, fmt::v7::type_identity_t<Char>>>) [with Char=char]" at line 1413 of "/s/dev/nightly/libraries/ioss/src/fmt/format-inl.h"
```
Rename the second set of variables to `pbegin` and `pend` to eliminate warning.
2020-08-13 18:58:31 -07:00
Greg Sjaardema
e204df0e66
nvcc compiler should be EDG-based, but fails test ( #1818 )
...
Our nvcc compilers (10.1.243 and 9.2.X) do not define the correct value for `FMT_USE_UDL_TEMPLATE` and then end up with an error later on in the build. Explicitly search for `__NVCC__` symbol not being defined. Might want to instead use `FMT_NVCC` or some other check, but the raw `__EDG_VERSION__` check is not working correctly for nvcc.
2020-08-13 15:18:57 -07:00
medithe
1c8bb54703
small changes to reduce clang-9 warnings ( #1808 )
...
* include/fmt/format.h: int_writer: removed unnecessary iterator type re-declaration (prevents shadow-waringing in clang)
* include/fmt/format.h: int_writer: correctly cast signed integer to unsigned to prevent 'implicit conversion changes signedness'-warnings in clang.
Co-authored-by: Martin Wührer <martin.wuehrer@artech.at>
2020-08-13 11:56:03 -07:00
Seokjin Lee
4b69c78751
fix: warning C4100: unreferenced formal parameter ( #1814 )
...
Add [[maybe_unused]] to fix it.
2020-08-12 06:57:22 -07:00
n16h7hunt3r
fb0aeb8209
fix: disabled UDL templates for PGI ( #1811 ) ( #1812 )
...
* fix: disabled UDL templates for PGI (#1811 )
* fix: insert defined auround __PGI
Co-authored-by: n16h7hunt3r <n16h7hunt3r@nixos>
2020-08-11 15:27:27 -07:00
Victor Zverovich
54daa0864a
Add dynamic width support to FMT_COMPILE ( #1809 )
2020-08-10 09:40:11 -07:00
Victor Zverovich
6fb7c6fb25
Workaround a bug in gcc10 ( #1810 )
2020-08-10 07:20:34 -07:00
Victor Zverovich
4fd95e4b4d
Don't remove trailing zeros with #
2020-08-08 08:14:39 -07:00
Victor Zverovich
e06ae32294
Avoid warnings on functions with external linkage that don't have declarations
2020-08-08 07:58:13 -07:00
Victor Zverovich
7fc3d1f54c
Add override to grow
2020-08-08 07:23:11 -07:00
Victor Zverovich
065889a593
Use correct capacity in iterator_buffer ( #1807 )
2020-08-08 07:01:21 -07:00
Barry Revzin
d0dd678693
Adding convenience append(range)
2020-08-08 06:33:46 -07:00
Victor Zverovich
c13f79e09e
Merge release branch
2020-08-07 07:01:21 -07:00
Victor Zverovich
1ebc2f7cc6
Bump version
2020-08-06 07:41:04 -07:00
Victor Zverovich
0907c08ae5
Fix handling of default alignmment with locale ( #1801 )
2020-08-06 07:39:09 -07:00
Kingcom
37c8f4eaf3
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-08-06 07:38:57 -07:00
Victor Zverovich
eaaaec9992
Workaround a bug in msvc
2020-08-06 07:38:51 -07:00
Victor Zverovich
ccf8561cb3
Workaround broken numeric_limites, part 2 ( #1787 )
2020-08-06 07:38:32 -07:00
Victor Zverovich
0cc73ebf79
Report error on missing named argument ( #1796 )
2020-08-06 07:38:18 -07:00
Victor Zverovich
33efc3c94f
Fix handling of iterators in locale-specific formatting ( #1782 )
2020-08-06 07:38:08 -07:00
medithe
717b226b59
include/fmt/format.h: explicit cast to std::size_t for parameter to buffer.resize() in order to get rid of warning 'implicit conversion changes signedness:' in clang-8 ( #1802 )
...
Co-authored-by: Martin Wührer <martin.wuehrer@artech.at>
2020-08-05 09:37:10 -07:00
Victor Zverovich
2a69f56769
Tweak buffer size
2020-08-05 08:22:12 -07:00
Victor Zverovich
ea76933802
Simplify ostream
2020-08-04 20:11:43 -07:00
Victor Zverovich
5413713c95
Remove unused function
2020-08-04 19:08:06 -07:00
Victor Zverovich
57f462428d
Increase the default buffer size
2020-08-04 08:19:19 -07:00
Victor Zverovich
e587adb4e9
Simplify count_digits
2020-08-03 15:45:48 -07:00
Victor Zverovich
279d698e1b
Fix handling of default alignmment with locale ( #1801 )
2020-08-03 10:51:42 -07:00
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
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
86b63bb71a
Bump version
2020-07-29 07:14:25 -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
e8f2580a43
Bump version
2020-07-28 09:25:15 -07:00
Victor Zverovich
95d3abf95c
Make format_to_n part of the core API
2020-07-24 09:25:26 -07:00
Victor Zverovich
47f8d7a345
Make formatted_size part of the core API
2020-07-23 08:51:38 -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
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
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
Victor Zverovich
397ad1bec3
Optimize common case
2020-06-15 18:30:31 -07:00
Victor Zverovich
7431165f38
Make to_string bypass format
2020-06-15 17:55:16 -07:00
Victor Zverovich
ee4d4c7fd0
Inline compiled format
2020-06-14 11:38:39 -07:00
Victor Zverovich
ab2f8484e0
Finish text::format
2020-06-14 11:04:41 -07:00
Victor Zverovich
e900d735bb
Re-enable assert in format_decimal
2020-06-14 09:30:03 -07:00
Victor Zverovich
f4de7b684a
Fix ambiguity
2020-06-14 08:26:12 -07:00
Victor Zverovich
1f8f5450b5
Reuse format_decimal
2020-06-14 07:42:52 -07:00
Victor Zverovich
d702a68df2
Fix formatting of bool with FMT_COMPILE and add more tests
2020-06-14 07:16:50 -07:00
Victor Zverovich
e956a14e9e
Use write instead of format_int in to_string
2020-06-13 20:07:08 -07:00
Victor Zverovich
98dcc251eb
Undo branching reduction
2020-06-13 18:23:52 -07:00
Victor Zverovich
5b8641dddf
Undo branching reduction
2020-06-13 16:50:55 -07:00
Victor Zverovich
8c88abde64
Fix sign handling in 'L'
2020-06-13 06:57:19 -07:00
Victor Zverovich
23b976a615
Reduce branching
2020-06-12 19:46:00 -07:00
Victor Zverovich
9edee0e727
Optimize small string parsing
2020-06-12 19:22:33 -07:00
Victor Zverovich
a909d42b76
Fix a warning
2020-06-12 13:49:31 -07:00
Victor Zverovich
16637341b9
Enable compilation for all types
2020-06-12 13:27:21 -07:00
Victor Zverovich
2d71d7e030
Add a simple format string compilation API
2020-06-12 08:37:15 -07:00
Victor Zverovich
547f12ae63
Fix a warning ( #1722 )
2020-06-11 15:02:42 -07:00
Victor Zverovich
2453ee576a
Improve default formatting
2020-06-09 08:59:01 -07:00
Victor Zverovich
936a1833c2
Add default_arg_formatter
2020-06-08 08:14:34 -07:00
Victor Zverovich
f2c9cb6244
Fix a UB
2020-06-08 06:32:11 -07:00
Victor Zverovich
d3107f8551
Cleanup arg_formatter_base
2020-06-07 20:55:38 -07:00
Victor Zverovich
5e7c70e206
Simplify arg_formatter_base
2020-06-07 19:38:43 -07:00
Victor Zverovich
38cc68b3e5
Inline visitor
2020-06-07 08:36:33 -07:00
Victor Zverovich
6732ea5000
Make symbols readable
2020-06-07 07:49:11 -07:00
Victor Zverovich
57ddc77ce7
Make advance_to a noop for back_insert_iterator
2020-06-06 19:36:39 -07:00
Victor Zverovich
50bad7d62d
Optimize format string parsing
2020-06-06 10:15:19 -07:00
Victor Zverovich
8f7a824e47
Inline visit
2020-06-06 09:02:32 -07:00
Victor Zverovich
f11e968708
Optimize format string parsing
2020-06-06 08:15:33 -07:00
Victor Zverovich
09737dd83b
Optimize format handler
2020-06-06 07:17:02 -07:00
Victor Zverovich
d9e3d6e6ed
Move format_handler to detail
2020-06-06 06:38:48 -07:00
Victor Zverovich
795b47a7b5
Fix a warning ( #1712 )
2020-06-05 08:24:09 -07:00
rimathia
95c6ac0cc8
fix typo which caused the loss of the counting information when using a printf context with a truncating_iterator
2020-06-05 07:37:54 -07:00
Victor Zverovich
21409cfdda
Fix warnings
2020-06-04 07:50:07 -07:00
Victor Zverovich
88c8d534e7
Move digits10 to where they belong and add comments
2020-06-04 06:39:18 -07:00
Victor Zverovich
0f3eaeac0a
Fix a warning
2020-06-04 06:33:11 -07:00
Victor Zverovich
16aec06179
Cleanup arg_formatter_base
2020-05-31 10:58:52 -07:00
Victor Zverovich
1e1193590d
Fix format_decimal overloads
2020-05-31 10:12:34 -07:00
Victor Zverovich
0893c9c2ef
Inline parse_format_string
2020-05-30 20:30:18 -07:00
Victor Zverovich
3245145a41
Remove undocumented buffer_range and output_range
2020-05-30 13:07:52 -07:00
Victor Zverovich
7d22bebb6f
Remove uses of buffer_range
2020-05-30 06:50:45 -07:00
Victor Zverovich
5aabf1f715
Simplify copy_str
2020-05-29 17:59:08 -07:00
Victor Zverovich
19c5b5d159
Simplify arg_formatter
2020-05-29 16:53:12 -07:00
Victor Zverovich
519571edec
Simplify arg_formatter_base
2020-05-29 14:44:18 -07:00
Victor Zverovich
ac8dfd841f
Improve handling of separators
2020-05-29 08:15:44 -07:00
Victor Zverovich
2c6165a22b
Reduce the number of comparisons
2020-05-29 05:42:35 -07:00
Victor Zverovich
28639969ef
Use memcpy for copying digits
2020-05-28 22:33:08 -07:00
Lucian Petrut
51bf9cfacb
Fix Mingw support
...
If the ``_POSIX_`` flag is set, _fdopen will not be defined by
Mingw headers, which is addressed by this commit.
For what is worth, as opposed to ``fdopen``, ``_pipe`` *will*
actually have the ``_`` prefix when ``_POSIX_`` is set.
2020-05-26 06:39:22 -07:00
Victor Zverovich
1a716caf5d
Optimize common case
2020-05-25 19:16:35 -07:00
rimathia
8c8f74a870
fix zero flag for char types and make zero flag ignored if a precision is specified
2020-05-23 12:46:26 -07:00
Victor Zverovich
bc1b89da26
Temporarily revert parsing changes
2020-05-22 15:39:33 -07:00
Victor Zverovich
a7fb321ac6
Remove a redundant branch
2020-05-22 15:39:33 -07:00
Daniil Goncharov
8cadb96506
fix max/min macro ( #1697 )
2020-05-22 06:38:43 -07:00
Victor Zverovich
943532fece
Make ostream formatter work with compile-time format strings ( #1692 )
2020-05-20 14:59:57 -07:00
Victor Zverovich
a265e25b79
Optimize small string parsing
2020-05-19 13:44:22 -07:00
Victor Zverovich
2aa2526f64
Optimize small string concatenation
2020-05-19 11:45:09 -07:00