Victor Zverovich
d07cc2026b
FMT_EXPLICIT -> explicit, FMT_NULL -> nullptr
2019-05-30 07:42:36 -07:00
Alex Alabuzhev
77d6036cd5
Fix unexpected trailing decimal point ( #1153 )
2019-05-11 06:34:47 -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
018d8b57f6
Remove broken snprintf
2019-03-30 20:27:52 -07:00
Victor Zverovich
76d326a2a2
Enable grisu for general format
2019-03-17 09:48:50 -07:00
Victor Zverovich
355eb6d29a
Enable grisu for shortest roundtrip (default) formatting
2019-02-03 10:38:28 -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
Victor Zverovich
639de21757
Workaround more MSVC bugs
2018-12-06 12:16:04 -08:00
Victor Zverovich
bd1104046b
Workaround a bug in MSVC
2018-12-06 08:16:01 -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
a23d592472
Fix check_format_string ( #925 )
2018-11-03 16:51:15 -07:00
Victor Zverovich
0a96c032b9
Parameterize v*printf on string type ( #920 )
2018-10-25 13:52:08 -07:00
Victor Zverovich
20c708bf6d
Fix build on gcc 4.4
2018-10-24 10:52:02 -07:00
Victor Zverovich
50b18a3c10
Integrate Grisu
2018-10-14 14:33:25 -07:00
Victor Zverovich
1489d3b7fa
Implement exponential notation
2018-08-29 18:55:57 -07: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
b76bb79613
Improve naming consistency
2018-05-19 10:32:53 -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
86a9bc8291
Cleanup
2018-03-04 09:16:51 -08:00
Victor Zverovich
67e070fe5a
Make format work with C++17 std::string_view ( #571 )
2018-02-07 08:14:54 -08:00
Victor Zverovich
5060568f72
%.f should have zero precision, not default precision
2018-01-27 17:56:19 -08:00
Victor Zverovich
94edb1a71c
Add a lightweight header for the core API
2017-12-06 07:42:42 -08:00
Victor Zverovich
b25a029284
Check pointer type specs are compile time
2017-11-23 10:12:23 -08:00
Victor Zverovich
c523dd584f
Use error handler to report errors
2017-11-19 07:36:01 -08:00
Victor Zverovich
5a32e64b05
More tests
2017-11-19 07:03:12 -08:00
Victor Zverovich
af00e4f9c9
Remove printf_arg_formatter from format.h and cleanup
2017-09-04 12:28:53 -07:00
Victor Zverovich
0fbd846561
Replace fmt::internal::make_unsigned with std::make_unsigned
2017-09-04 11:41:15 -07:00
Victor Zverovich
016acebb56
Remove legacy code
2017-08-26 09:09:43 -07:00
Victor Zverovich
6a2ff287b2
Follow standard naming conventions
2017-02-19 08:05:41 -08:00
Victor Zverovich
50e716737d
StringRef -> string_view, LongLong -> long_long
2017-02-18 07:34:52 -08:00
Victor Zverovich
9bb213e920
FormatError -> format_error
2016-08-25 08:38:07 -07:00
Victor Zverovich
9dbb60c4c8
Move fmt::fprintf to printf.h
2016-08-03 08:52:05 -07:00
Victor Zverovich
8631694021
check -> const_check to avoid a conflict with AssertMacros.h ( #350 )
2016-07-12 06:40:23 -07:00
Glen Stark
72d51e0b1e
Implemented #335 : custom printf support
2016-06-09 08:41:56 -07:00
Victor Zverovich
90730e706b
Move ostream support to ostream.{h,cc}
2016-05-06 07:37:20 -07:00
Victor Zverovich
afd67497de
cppformat -> fmt
2016-04-24 09:06:12 -07:00
vitaut
9ffe98c00e
Fix/suppress MSVC warnings
2016-03-19 06:39:33 -07:00
vitaut
59607f5e99
Fix warnings on GCC 4.6.3
2016-03-09 07:47:08 -08:00
vitaut
3ecad55910
Fix sign conversion warnings
2016-03-02 07:53:14 -08:00
Mario Werner
d411aa165e
use quotes for including cppformat headers from the tests
2016-02-02 16:58:41 +01:00
Mario Werner
a659d8079e
Merge branch 'master' into update-project-layout
2016-01-31 17:00:05 +01:00
Mario Werner
fee52f79b8
update the includes in the tests to get rid of the deprecated warnings
2016-01-30 22:33:37 +01:00
vitaut
7ee287d3d9
Sign extend arguments of smaller types passed to %ll? ( #265 )
2016-01-27 07:03:19 -08:00
vitaut
8474a6232d
Don't perform narrowing conversion for integers in printf ( #255 )
2016-01-24 00:43:42 +01:00
Nicholas Hutchinson
1a5a1708b7
Add fprintf overload that writes to a std::ostream
...
For completeness, add an overload for printf that takes a std::ostream.
2015-12-23 15:59:13 +13:00
vitaut
1a2a333a1a
Use format specifiers when formatting null pointers & strings
2015-11-23 21:01:28 -08:00
vitaut
2157375d5c
Use textual formatting for bool with %s
specifier in printf ( #224 )
2015-11-13 07:18:44 -08:00
vitaut
57ba9436a0
Format null string as (nil)
with p
specifier
2015-11-12 06:09:08 -08:00
vitaut
b5fda1c90d
Format null pointer as (nil) and null string as (null) in printf ( #226 )
2015-11-11 07:57:19 -08:00
vitaut
8b86a74ad5
Allow formatting C strings as pointers ( #223 )
2015-11-09 07:17:36 -08:00
vitaut
cd097d334e
Workaround bogus coverity warnings
2015-10-21 06:16:55 -07:00
vitaut
c684886dfc
Make coverity happy
2015-10-20 08:29:41 -07:00
vitaut
d25d775ae6
Suppress bogus coverity warnings
2015-10-20 06:26:31 -07:00
vitaut
56d3b9135f
Try a workaround for a bogus Coverity warning
2015-10-19 08:17:05 -07:00
vitaut
ef710dee6c
Add sprintf overload for wide strings
...
and fix an issue in formatting user-defined objects.
Thanks to @ScottLangham
2015-09-18 16:26:41 -07:00
vitaut
79d8f59906
Implement formatting of objects with (s)printf.
2015-09-08 08:36:20 -07:00
vitaut
e39490500c
Replace implicit conversion to std::string with to_string
2015-06-17 07:59:41 -07:00
vitaut
cf04d98d06
Pass as many types as possible in a single integer to reduce code bloat
2015-03-24 08:55:40 -07:00
Shauren
a445e727c2
Added support to format more than 16 arguments with printf API when using variadic templates
2015-03-20 21:31:10 +01:00
Victor Zverovich
5821aec7b9
Implement printing of values that are convertible to int such as enums
2015-03-10 07:53:46 -07:00
Victor Zverovich
615c1eef6b
Fix error handling in fmt::fprintf.
2014-11-14 09:40:01 -08:00
Victor Zverovich
605d2600f8
Improve error reporting.
2014-08-29 07:45:55 -07:00
Victor Zverovich
279c7a6e6a
Change "number is too big in format" to "number is too big" because the error can occur not only in the format function.
2014-08-28 06:50:52 -07:00
Victor Zverovich
526b7fc91d
Throw exception in parse_nonnegative_int if the number is too big.
2014-08-28 06:42:59 -07:00
Victor Zverovich
da0293c4dd
Add missing include.
2014-08-21 07:29:23 -07:00
Victor Zverovich
03cdf1235a
Test printf.
2014-08-21 07:14:02 -07:00
Victor Zverovich
f1ac0a19e9
Test float.
2014-08-20 08:21:06 -07:00
Victor Zverovich
be00d8b272
Convert integer argument like printf does.
2014-08-19 08:49:10 -07:00
Victor Zverovich
c4a4a05d12
Improve handling of char in printf.
2014-08-19 08:14:21 -07:00
Victor Zverovich
f2be7851cc
Fix a warning.
2014-08-19 07:29:30 -07:00
Victor Zverovich
e0f92d675e
Fix a warning.
2014-08-19 07:14:25 -07:00
Victor Zverovich
39ac84f01e
Comment.
2014-08-18 07:03:22 -07:00
Victor Zverovich
186734cf8b
Fix warnings.
2014-08-18 07:03:12 -07:00
Victor Zverovich
c7cfa7d4e7
More tests.
2014-08-15 06:58:24 -07:00
Victor Zverovich
18f1e08685
Test 'll' specifier.
2014-08-13 06:59:29 -07:00
Victor Zverovich
ddd087d8d1
Test more length specifiers.
2014-08-13 06:42:15 -07:00
Victor Zverovich
5614295aa1
Test 'l' specifier.
2014-08-12 08:15:39 -07:00
Victor Zverovich
7c14431211
Enable 'h' speciffier tests.
2014-08-12 06:49:27 -07:00
Victor Zverovich
adbf3f8b86
Rewrite length specifier tests without using printf to workaround broken MSVC implementation.
2014-08-11 08:34:17 -07:00
Victor Zverovich
137153b9f0
Take integer promotion into account.
2014-08-11 06:54:58 -07:00
Victor Zverovich
910dec5ed3
Fix 'l' specifier test.
2014-08-11 06:33:40 -07:00
Victor Zverovich
028d12dacd
Disable 'l' specifier tests.
2014-08-09 10:12:36 -07:00
Victor Zverovich
316ae7e244
Implement more printf length specifiers.
2014-08-09 10:04:35 -07:00
Victor Zverovich
bdbacde659
Test 'h' specifier.
2014-08-09 08:53:14 -07:00
Victor Zverovich
3465d056e7
Test hh specifier with unsigned char.
2014-08-08 06:59:17 -07:00
Victor Zverovich
566061d1f1
Fix formatting of signed ints in test.
2014-08-06 08:21:12 -07:00
Victor Zverovich
e04b07921f
Debug length specifier test.
2014-08-06 07:16:49 -07:00
Victor Zverovich
8b41b09add
Test 'hh' and 'h' printf specifiers.
2014-08-06 07:00:04 -07:00
Victor Zverovich
86bbd3c238
Test hh length.
2014-08-05 08:21:47 -07:00
Victor Zverovich
b797d39dd1
Test printf length.
2014-08-05 07:52:59 -07:00
Victor Zverovich
fc10d10b6b
Disable hh specifier tests for now because broken MSVC's printf causes test failures.
2014-08-01 08:50:09 -07:00
Victor Zverovich
a259c941e2
Implement 'l' length specifier.
2014-08-01 07:15:27 -07:00
Victor Zverovich
d81fafc295
Fix tests on MSVC, take 2.
2014-07-31 07:43:14 -07:00
Victor Zverovich
3f444fe3e2
Fix tests on MSVC.
2014-07-31 06:47:24 -07:00
Victor Zverovich
e2f0408b69
Print format string on failure.
2014-07-30 10:59:23 -07:00
Victor Zverovich
f4156b57f0
Implement 'hh' length specifier in printf.
2014-07-30 08:39:07 -07:00
Victor Zverovich
39b0930aee
Improve handling of 'h' length specifier in printf.
2014-07-30 08:08:08 -07:00