Commit Graph

344 Commits

Author SHA1 Message Date
Victor Zverovich
da0ea4161a Make compile-time checks work with fallback formatter (#1088) 2019-03-21 19:26:53 -07:00
mwinterb
7ad3015f5b Added missing typename to FMT_STRING. (#1089)
* Added missing typename to FMT_STRING.

This is so that FMT_STRING can be used in a template.
2019-03-20 20:37:00 -07:00
Victor Zverovich
294fd7df96 Remove isinf workaround 2019-03-17 14:49:19 -07:00
Victor Zverovich
bc784d3625 Remove isnan workaround 2019-03-17 12:23:36 -07:00
Victor Zverovich
76d326a2a2 Enable grisu for general format 2019-03-17 09:48:50 -07:00
Victor Zverovich
c21c6b8c4b Move enable_if to template params 2019-03-16 15:15:38 -07:00
Bruce Mitchener
4523053e6f Fix typos. 2019-03-10 07:49:33 -07:00
Victor Zverovich
49d244c065 Don't emit more than precision digits (#1072) 2019-03-09 13:53:23 -08:00
Victor Zverovich
3466d9c845 Don't override fixed formatting depending on exponent (#1072) 2019-03-09 13:22:07 -08:00
Victor Zverovich
93d22dec35 Implement rounding up and clean up FP formatting 2019-03-09 10:40:36 -08:00
Victor Zverovich
d560ddac25 Temporarily disable Grisu for fixed formatting 2019-03-08 19:09:05 -08:00
Michael Winterberg
d8434baa03 Declare the size of RESET_COLOR.
This is so that the format with a text_tyle will compile even if
header-only mode isn't enabled. Addresses #1063.
2019-03-06 09:41:45 -10:00
gawain
79b79f329e Add support for '%' type to output floating point values as a
percentage.

This helps with compatibility with Python's format strings.
2019-03-05 17:36:20 -08:00
Alexander Bolz
287eaab3b2 Increment output iterator in basic_writer::write for character types (#1056) 2019-02-26 12:16:34 -10:00
Victor Zverovich
a97757736b Use grisu for fixed precision 2019-02-23 15:50:50 -10:00
Brian
327d4b6e9e Fixes for some pedantic warnings (#1054)
* Fix order of initializers

* Remove unused parameter

* Disable warning "-Wswitch-enum"
2019-02-23 09:40:08 -10:00
Victor Zverovich
8af651be39 Implement fixed precision 2019-02-22 10:47:27 -10:00
Victor Zverovich
82c24edcf6 Workaround a bogus Qt Creator warning 2019-02-19 06:33:55 -10: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
5a314a5288 Eliminate extra copy on floating-point formatting 2019-02-06 10:17:50 -08:00
Victor Zverovich
355eb6d29a Enable grisu for shortest roundtrip (default) formatting 2019-02-03 10:38:28 -08:00
Victor Zverovich
b8d34e0db3 Fix rounding 2019-02-02 09:19:46 -08:00
Elias Kosunen
c3268f4e50 Remove use cases of deprecated functionality 2019-02-02 05:48:39 -08:00
Elias Kosunen
34951f1999 Replace comments regarding deprecation with attributes 2019-02-02 05:48:39 -08:00
Victor Zverovich
06c005b7b0 Clarify that compile-time checks don't support named arguments 2019-01-27 10:10:13 -08:00
Daniela Engert
9f70b034e1 Implement precision for floating-point durations.
The formatting syntax follows p1361r0, augmented by a precision field as proposed in #1004.

Signed-off-by: Daniela Engert <dani@ngrt.de>
2019-01-23 07:17:00 -08:00
Victor Zverovich
5f1ceebc7f Make formatter<T> override ostream<< for templates (#952) 2019-01-21 09:42:55 -08:00
Victor Zverovich
83f052930a Add code from p0645 2019-01-20 15:12:01 -08:00
Victor Zverovich
58b6f8db48 Format the code using clang-format 2019-01-13 06:58:20 -08:00
stryku
9a777b9e1c Implemented fmt::prepare()
Implementation of fmt::prepare() function and features around it.
2019-01-12 10:53:31 -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
77a7244804 Implement fill/align/width for strftime-like formatting 2018-12-19 07:03:02 -08:00
Victor Zverovich
3e01376e08 Implement fill/align/width parsing in chrono formatter 2018-12-16 09:08:11 -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
37f599b1a1 Fix docs 2018-12-12 17:50:50 -08:00
Victor Zverovich
de71db6d42 Fix asan error (#977) 2018-12-12 11:29:39 -08:00
Victor Zverovich
2d624218bf Fix another warning 2018-12-05 10:19:53 -08:00
Victor Zverovich
37dc495b9d Simplify MSVC workaround 2018-12-05 06:22:18 -08:00
liuping
2ff4996d05 Fix ambiguous complier error C2666 in vs2017.The '+' opeator may cause ambiguity.Avoid implicit conversion. 2018-12-05 05:55:43 -08:00
Victor Zverovich
bcf3fcd673 Clean up bit fiddling for argument packing 2018-11-30 17:04:49 -08:00
Victor Zverovich
99744f8f8f Suppress unfixable warning 2018-11-28 12:52:41 -08:00
Victor Zverovich
01640f44cf Fully qualify dummy_int (#941) 2018-11-24 06:22:59 -08:00
christinaa
16b78ee629 fix incompatibilities with c++2a mode in clang 2018-11-17 08:38:04 -08:00
Victor Zverovich
19e008876b More locale support 2018-11-14 16:25:49 -08:00
Victor Zverovich
f2ee988105 Improve locale support 2018-11-14 12:07:39 -08:00
Victor Zverovich
e01579231d Disallow leading zeros in arg-id 2018-11-08 08:48:56 -08:00
Victor Zverovich
a23d592472 Fix check_format_string (#925) 2018-11-03 16:51:15 -07:00
Victor Zverovich
324eac1aa5 Make locales work with any character type 2018-10-28 09:03:27 -07:00