Victor Zverovich
7645ca0724
Clean up printf
2020-04-11 08:01:00 -07:00
Victor Zverovich
f72a905eb3
Fix handling of volatile enums
2020-03-11 08:40:57 -07:00
Victor Zverovich
c8dd9cc99d
Use type_identity to block unnecessary template argument deduction (thanks Tim Song)
2020-01-15 10:27:50 -08:00
Victor Zverovich
8cf4c52068
Apply clang-format
2019-12-21 13:10:45 -08:00
parkertomatoes
9acf89fef6
Mitigate MSVC issue with min/max macros ( #1480 )
2019-12-16 08:24:00 -08:00
Florin Iucha
72879db40e
Clean-up sign-conversion warnings in public headers
2019-12-08 16:07:55 -08:00
Victor Zverovich
3e1f70fe02
Merge write_fp into write
2019-11-20 12:20:17 -08:00
Victor Zverovich
125fc5e520
Update comment
2019-11-20 11:45:25 -08:00
Victor Zverovich
ffd05e65ed
basic_parse_context -> basic_format_parse_context per standard and document
2019-11-05 07:13:58 +00:00
Ivan Shynkarenka
21acc2af43
Fix more Visual Studio 2019 pedantic warnings ( #1371 )
...
* format-inl.h(444,1): warning C4804: '>>': unsafe use of type 'bool' in operation
format.h(2808,1): warning C4127: conditional expression is constant
* More fixes for VS2019 pedantic warnings
* Fix "conditional expression is constant" VS2019 warning in more specific way
* Use const_check to silence constexpr warning
2019-10-22 17:13:03 -07:00
Victor Zverovich
d39ebf3ff2
Optimize counting
2019-10-21 06:57:42 -07:00
Victor Zverovich
2730e90186
Fix compile error in printf with gcc9 ( #1354 )
2019-10-09 18:58:40 -07:00
Victor Zverovich
e4d6d9d7c8
Implement divmod
2019-10-09 13:40:50 -07:00
Orivej Desh
b66bb6b71f
Fix undefined in core-test and printf-test ( #1345 )
...
* Fix undefined in core-test
Fixes "reference binding to null pointer" in BufferTest.Ctor
buffer.operator[] attempts to return a reference to `buffer.ptr_[0]` when `ptr_`
in `mock_buffer<int> buffer` is null.
* Fix undefined in printf-test
Fixes "signed integer overflow" in PrintfTest.Length
This occurs in `TestLength<long long>("ll")`, since its minimum value minus one
does not fit in long long.
* Fix undefined in printf %0$
Printf counts arguments from 1.
Fixes "shift exponent -4 is negative" in PrintfTest.InvalidArgIndex.
`do_get` is called with index -1 when `basic_printf_context.arg` is called with
id 4294967295 when basic_printf_context::get_arg subtracts 1 from arg_index 0 in
the format string "%0$d".
2019-10-08 06:28:39 -07:00
Victor Zverovich
c85ae23c73
Add max_value
2019-09-08 09:21:30 -07:00
Deniz Evrenci
6de0454b42
Add support for built-in __int128 when available
2019-09-04 07:05:08 -07:00
Victor Zverovich
3f75e2b69e
Make buffer_range public and update custom formatting docs ( #1281 )
2019-08-28 06:50:20 -07:00
Victor Zverovich
dd8cc8b0ba
Disallow passing views as lvalues
2019-07-09 12:18:48 -07:00
Victor Zverovich
f6f0415b83
typedef -> using
2019-07-07 17:14:26 -07:00
Victor Zverovich
5488d0b53a
spec -> specs
2019-07-07 06:39:20 -07:00
Victor Zverovich
e4f84ee1c6
Refactor format_specs for #1109 and #940
...
Refactor `format_specs` and related APIs to support variable-width fill
(#1109 ), improve naming consistency, remove legacy setters (#940 ), and
optimize layout.
2019-07-06 20:57:40 -07:00
Victor Zverovich
c286ffc88d
int_traits -> uint32_or_64_t
2019-07-03 16:01:21 -07:00
Victor Zverovich
6952732b6c
Remove misplaced checks
2019-06-23 06:33:07 -07:00
Victor Zverovich
f13906f408
back_insert_range<internal::buffer> -> buffer_range
2019-06-19 14:12:29 -07:00
Victor Zverovich
874d6727e4
Remove workarounds for pre-C++11 compilers
2019-06-13 20:56:08 -07:00
Victor Zverovich
9d7b64a259
More cleanup
2019-06-11 22:11:47 -07:00
Victor Zverovich
c264e641ea
Add conditional_t for pre-C++14
2019-06-04 18:50:30 -07:00
Victor Zverovich
ec6651087d
Remove old is_constructible workarounds and replace typedefs with using
2019-06-02 16:46:45 -07:00
Victor Zverovich
4d4b8c238d
FMT_CHAR -> char_t
2019-06-02 15:03:37 -07:00
Victor Zverovich
8302c2f33b
fmt::internal::declval -> std::declval
2019-05-30 09:46:10 -07:00
Victor Zverovich
291ba837f2
Remove wrong compile-time checks from printf ( #1173 )
2019-05-24 07:50:13 -07:00
Victor Zverovich
bd516e3429
Convert negative precision to zero in printf ( #1127 )
...
and remove redundant check in grisu2_prettify.
2019-04-21 07:44:04 -07:00
Victor Zverovich
397e8dd9d5
clang-format
2019-04-15 11:39:19 -07:00
ToolsDevler
2b415b7af7
Restructure printf_arg_formatter to make it customizable
2019-04-15 11:10:31 -07:00
Victor Zverovich
2808395481
basic_buffer -> buffer
...
This reduces symbol sizes and gets rid of shadowing warnings.
2019-04-07 20:32:28 -07:00
Victor Zverovich
018d8b57f6
Remove broken snprintf
2019-03-30 20:27:52 -07:00
Victor Zverovich
294fd7df96
Remove isinf workaround
2019-03-17 14:49:19 -07:00
Victor Zverovich
c21c6b8c4b
Move enable_if to template params
2019-03-16 15:15:38 -07:00
Victor Zverovich
ae0b0dab9f
Remove obsolete TODO
2019-03-16 10:04:16 -07:00
Bruce Mitchener
4523053e6f
Fix typos.
2019-03-10 07:49:33 -07:00
Victor Zverovich
f041f128f5
Minor cleanup
2019-02-10 15:20:40 -08:00
Victor Zverovich
e4572e5def
Update std implementation
2019-02-10 07:56:33 -08:00
Victor Zverovich
442fa1bd46
Decouple format and parse contexts
2019-02-09 20:39:37 -08:00
Victor Zverovich
744e66bb08
Deprecate format_context::parse_context()
2019-02-09 16:15:20 -08:00
Victor Zverovich
83f052930a
Add code from p0645
2019-01-20 15:12:01 -08:00
Daniela Engert
b0cde860ae
Implement 'snprintf(OutputIt it, size_t n, const S &format, const Args & ... args)' ( #917 )
...
Mostly equivalent to 'sprintf(const S &format, const Args & ... args)' but generates at most 'n' characters through output iterator 'it'. The output type is the same as with 'format_to_n'.
Signed-off-by: Daniela Engert <dani@ngrt.de>
2019-01-13 13:08:01 -05:00
Victor Zverovich
58b6f8db48
Format the code using clang-format
2019-01-13 06:58:20 -08:00
Daniela Engert
f5cc77cea0
Get rid of 'null_terminating_iterator' in printf.h ( #980 )
...
The iterator class itself and its helpers 'to_pointer' are removed after reformulating the formatting loop in terms of a 'basic_string_view<Char>::iterator'.
Signed-off-by: Daniela Engert <dani@ngrt.de>
2019-01-04 12:18:14 -05:00
Sign Bit
0bbdca5b8b
Fix conversion warnings ( #989 )
...
* Fix sign conversion warnings
* Ignore unused local typedefs
* Remove cast reported as useless on GCC
* Remove warning on unused variable
* Enable conversion warning checking for pedantic build
* Fix sign-conversion warnings in headers
2018-12-20 06:24:19 -08:00
Victor Zverovich
8668639ae2
Get rid of null_terminating_iterator in format
2018-12-15 06:17:25 -08:00