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
Victor Zverovich
edd5f1445d
Fix compilation errors on gcc 4.4
2018-05-20 09:09:03 -07:00
Victor Zverovich
838400d29b
Add inline namespace fmt::v5
2018-05-12 11:02:15 -07:00
Daniela Engert
2570f1afdc
Provide more overloads for the wide string flavour
...
Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-05-05 07:31:44 -07:00
Victor Zverovich
fa9066fe3e
context_base::begin -> out
2018-04-22 09:16:32 -07:00
Victor Zverovich
7d28674d3a
make_args -> make_format_args
2018-04-08 07:21:26 -07:00
Victor Zverovich
23759b2688
basic_arg -> basic_format_arg, arg_store -> format_arg_store
2018-04-04 07:38:21 -07:00
Victor Zverovich
3cf0526316
Return output iterator to the end from format_to_n
2018-03-30 08:20:12 -10:00
Germán Méndez Bravo
7a41d61d79
Add make_printf_args
...
Fixes #687
2018-03-27 07:15:51 -10:00
Victor Zverovich
4023291759
Update docs
2018-03-04 09:55:17 -08:00
Victor Zverovich
418659adbe
Fix compilation errors on gcc 4.4
2018-03-03 14:04:59 -08:00
Victor Zverovich
1b4525384b
Fix more compilation errors on gcc 4.6
2018-02-28 05:09:24 -08:00
Victor Zverovich
affb35cfb9
Replace using with typedef for compatibility with gcc-4.6
2018-02-11 09:23:47 -08:00
Victor Zverovich
522de7b55d
Replace using with typedef for compatibility with gcc-4.6
2018-02-11 08:32:02 -08:00
Victor Zverovich
5013c15737
Silence MSVC 2017 constant if expression warning
2018-02-10 06:52:46 -08:00
Victor Zverovich
08dff3774c
Allow compiling and using as DLL in windows #502
2018-01-28 20:50:43 -08:00
Victor Zverovich
5060568f72
%.f should have zero precision, not default precision
2018-01-27 17:56:19 -08:00
Victor Zverovich
bd8a7e7ea1
More iteratification
2018-01-21 14:30:38 -08:00
Victor Zverovich
f853d94a15
Remove unnecessary fmt/ prefix ( #397 )
2018-01-20 10:28:10 -08:00
Victor Zverovich
f6fd38bb3a
More iterator support
2018-01-15 08:48:37 -08:00
Victor Zverovich
c2fecb9b2a
Clean API
2018-01-14 14:15:59 -08:00
Victor Zverovich
9a53a706fc
Add support for back_insert_iterator
2018-01-14 13:12:26 -08:00
Victor Zverovich
91ee9c9acd
Return iterator from the format method
2018-01-14 11:00:27 -08:00
Victor Zverovich
67928eae28
Don't inherit context from parse_context
2018-01-14 09:27:40 -08:00
Victor Zverovich
217e7c76f1
Pass ranges by value
2018-01-14 08:13:48 -08:00
Victor Zverovich
22994c62f7
Decouple arg_formatter_base from buffer
2018-01-13 15:34:48 -08:00
Victor Zverovich
c095445394
Replace buffer with range
2018-01-10 22:41:23 -08:00
Victor Zverovich
955062da2e
Merge printf.cc into printf.h
2017-12-17 08:36:19 -08:00
Victor Zverovich
7cea163809
numeric -> arithmetic
2017-12-09 06:19:15 -08:00