Commit Graph

86 Commits

Author SHA1 Message Date
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
Victor Zverovich
7f7504b3f5 Clean up docs 2018-12-12 18:21:13 -08:00
Victor Zverovich
8c2e15aed5 Make printf work in search (#164) 2018-12-12 16:07:54 -08:00
tnovotny
e37d6a9840 add make_printf_args and make_wprintf_args functions (#934)
* add make_printf_args and make_wprintf_args to printf.h
add minimal test for make_printf_args and make_wprintf_args to printf-test.cc

renamed the old printf_context template to basic_printf_context_t. the original wish was to rename it basic_printf_context, but that clashed with the name of the inner typedef. this style matches the format_context_t struct.
2018-11-22 13:57:07 -08:00
Victor Zverovich
f2ee988105 Improve locale support 2018-11-14 12:07:39 -08:00
Victor Zverovich
0a96c032b9 Parameterize v*printf on string type (#920) 2018-10-25 13:52:08 -07:00
Daniela Engert
2c81c851b2 Adapt any string-like type to be used by {fmt} just like the standard string types already supported. The adaption is totally non-intrusive.
Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-10-22 18:25:52 -07:00
Victor Zverovich
2924622157 Fix naming of basic_format_specs members 2018-10-17 10:13:10 -07:00
Daniela Engert
f27defc639 Parameterize printf functions on the type of the format string.
Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-10-08 06:22:04 -07:00
Victor Zverovich
f5480635c0 visit -> visit_format_arg 2018-10-05 07:15:41 -07:00
medithe
d43665056d Workaround visit lookup issues in printf.h on gcc 2018-09-19 09:16:26 -07:00
Victor Zverovich
7110b46076 Optimize default formatting 2018-09-12 08:45:14 -07:00
Victor Zverovich
a11eb3a090 Workaround various icc bugs (#822) 2018-08-22 09:07:17 -07:00
Victor Zverovich
35538ca66c Merge more format overloads 2018-07-22 12:24:47 -07:00
Victor Zverovich
479ee2a8c6 Fix MSVC build, take 2 2018-07-04 14:24:07 -07:00
Victor Zverovich
e928b6724c Fix MSVC 2013 build 2018-07-04 12:33:15 -07:00
Victor Zverovich
6322b47e60 Minor cleanup 2018-06-06 16:51:35 +02:00
Elias Kosunen
691a7a91a1 Add more compilers to CI and increase FMT_PEDANTIC warning levels (#736)
* Add a _lot_ more warnings to FMT_PEDANTIC
Fix these warnings

* Add more compilers to CI
Fix (some) of the compiler errors with them

* Enable -Werror on CI
Increase warning level on MSVC when compiling with FMT_PEDANTIC

* Add VS 2013 and 2015 to Appveyor

* Fix Appveyor tests
Formatting

* Implement requested changes
Fix some of the MSVC warnings
Implement C++11 integer_sequence

* Reintroduce appveyor-build.py

* Remove ranges-test from tests

* Remove (some) explicit warning suppressions
Fix C++ standard setting in CI

* Remove (some) explicit warning suppressions
Fix C++ standard setting in CI

* Fix test builds with C++11

* Enable pedantic warnings on tests

* Fix warnings from edits to master

* Cleanups

* Add C++11 support to ranges.h
Re-enable ranges-test
Fix a Visual Studio error about function not returning a value in printf.h
Fix a bug in .travis.yml
2018-06-06 15:57:59 +02:00