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
0c7650373c
Fix handling of types convertible to std::string_view
2019-10-05 06:58:37 -07:00
Victor Zverovich
87fbc6f756
get_type -> mapped_type_constant
2019-06-11 07:23:39 -07:00
Victor Zverovich
a291f07e1a
Clean up argument mapping
2019-06-09 22:27:40 -07:00
Victor Zverovich
cb4c59495e
Deprecate convert_to_int
2019-06-07 13:38:08 -07:00
Victor Zverovich
b3cf8613b1
Make formatter specializations override implicit conversions
2019-06-07 06:25:46 -07:00
Victor Zverovich
d2ee5f2407
Merge tests
2019-06-04 21:31:23 -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
49f78a427b
Demacrify
2019-05-30 21:30:29 -07:00
Victor Zverovich
d07cc2026b
FMT_EXPLICIT -> explicit, FMT_NULL -> nullptr
2019-05-30 07:42:36 -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
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
Elias Kosunen
c3268f4e50
Remove use cases of deprecated functionality
2019-02-02 05:48:39 -08:00
Victor Zverovich
58b6f8db48
Format the code using clang-format
2019-01-13 06:58:20 -08: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
982ee5c699
parse_context -> format_parse_context
2018-11-21 07:10:22 -08:00
Victor Zverovich
ccd3e8bbf3
Make is_constructible public ( #918 )
2018-10-27 17:10:19 -07:00
Victor Zverovich
61e6d2e38c
Fix core version of vformat_to
2018-10-25 06:21:41 -07:00
Victor Zverovich
20c708bf6d
Fix build on gcc 4.4
2018-10-24 10:52:02 -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
Daniela Engert
6a685571df
Make 'std::*::basic_string_view' a valid argument type for 'format_str' parameters.
...
Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-10-08 06:12:02 -07:00
Victor Zverovich
dc69cc45d2
Clean tests
2018-09-21 09:48:21 -07:00
Victor Zverovich
3f4984fb36
Clean core-test and fix linkage errors on older gcc
2018-09-19 12:24:38 -07:00
Victor Zverovich
918bb1ce8f
Optimize argument capture
2018-09-08 15:29:32 -07:00
Victor Zverovich
569ac91e0b
Implement Grisu boundary computation
2018-08-25 11:39:38 -07:00
Victor Zverovich
987514761e
Make convert_to_int public ( #818 )
2018-08-22 07:40:06 -07:00
Victor Zverovich
8db14efa84
util-test -> core-test and minor cleanup
2018-07-22 17:05:23 -07:00